Skip to content

TST: fix intermittent dict_complex test failures #7298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2014

Conversation

matthew-brett
Copy link
Contributor

test_dict_complex and test_dict_numpy_complex would give occasional test
failures on Python 3.4. The test was written to depend on the order of values
from dict.values(); remove that dependency.

Closes gh-7293.

all(map(lambda x, y: type(x) == type(y), x.values(), x_rec.values())))
for key in x:
self.assertEqual(x[key], x_rec[key])
self.assertEqual(type(x[key]), type(x_rec[key]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and much cleaner. I can see why this is not very reproducable!

Is it worth checking isEqual(len(x), len(x_rec)) or maybe isEqual(x.keys(), x_rec.keys()) (sigh, this isn't a set in python 2) which is implicitly done with the map ?

`test_dict_complex` and `test_dict_numpy_complex` would give occasional
test failures on Python 3.4.  The test was written to depend on the
order of values from `dict.values()`; remove that dependency.

Closes pandas-devgh-7293.
@matthew-brett
Copy link
Contributor Author

Good point - how about this version?

@jreback
Copy link
Contributor

jreback commented May 31, 2014

yeh these tests were ripped from the numpy-msgpack impl

thanks !

hayd added a commit that referenced this pull request May 31, 2014
TST: fix intermittent dict_complex test failures
@hayd hayd merged commit 09723ca into pandas-dev:master May 31, 2014
@hayd
Copy link
Contributor

hayd commented May 31, 2014

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent errors in test_dict_complex, test_dict_numpy_complex
3 participants