Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Make tests work with hash seed randomization turned on #352

Closed
bdferris opened this issue Sep 26, 2014 · 2 comments
Closed

Make tests work with hash seed randomization turned on #352

bdferris opened this issue Sep 26, 2014 · 2 comments

Comments

@bdferris
Copy link
Contributor

From [email protected] on November 16, 2012 06:57:35

As discussed in http://bugs.python.org/issue13703 , Python will eventually start using a randomized hash seed, which affects the iteration order of things like dicts and sets.  Admittedly, this won't be enabled by default until Python 3.3, but the functionality can be turned on selectively all the way back to Python 2.6.  When it IS turned on, it breaks a number of unit tests in the transitfeed library that make assumptions about the order of validation exceptions.  The order of the exceptions can be a function of underlying dictionary iteration order, so the test end up being non-deterministic.

I happen to run the transitfeed library in a 2.7 environment where randomized hash seeding has been enabled by default, so I'd like to get these tests fixed.  To do so, I will introduce a strict ordering of validation exceptions in unit tests that will be deterministic even if the original order of the exceptions is not.

Original issue: http://code.google.com/p/googletransitdatafeed/issues/detail?id=352

@bdferris
Copy link
Contributor Author

From [email protected] on November 16, 2012 06:57:53

(No comment was entered for this change.)

Blocking: googletransitdatafeed:344

@bdferris
Copy link
Contributor Author

From [email protected] on November 16, 2012 08:18:59

Fixed in r1731 .

Status: Fixed

@bdferris bdferris added this to the 1.2.13 milestone Oct 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant