Merge lp:~bac/launchpad/bug-891641 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14318 | ||||
Proposed branch: | lp:~bac/launchpad/bug-891641 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
36 lines (+7/-3) 1 file modified
lib/canonical/launchpad/tests/test_token_creation.py (+7/-3) |
||||
To merge this branch: | bzr merge lp:~bac/launchpad/bug-891641 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email: mp+82544@code.launchpad.net |
Commit message
[r=jcsackett][bug=891641] Clean up a test that sets random.seed(0) to restore entropy.
Description of the change
= Summary =
If random.seed(n) is used to provide determinism for a test then the
random number generator must be properly reseeded or subsequent tests
will use predictable random numbers.
== Proposed fix ==
Add a cleanup task to call random.seed() with no parameters, which
will correctly set the seed value using operating system-based entropy
if available or the system clock.
== Pre-implementation notes ==
None.
== Implementation details ==
As above.
== Tests ==
bin/test test_token_creation
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/canonical
Looks fine to me.