launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #08426
Re: ec2 test failures
On Nov 16, 2011, at 22:49 , Martin Pool wrote:
>
> Why would it return the same values? Well, there are several tests or
> functions reached from tests that reset the random seed, for instance
> test_token_creation just sets it flat out to zero.
Actually test_token_creation is the only test that resets the seed and what you have discovered is an error in that test. Anytime we set the seed to a specific value it should be reseeded when done so subsequent calls to random are not predictable. Calling random.seed() with no parameter takes pains to do the right thing.
I've created a branch to fix test_token_creation.
https://code.launchpad.net/~bac/launchpad/bug-891641/+merge/82544
--Brad
Follow ups
References