Merge lp://staging/~mbp/launchpad/891028-notunique into lp://staging/launchpad
Proposed by
Martin Pool
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Martin Pool | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14312 | ||||
Proposed branch: | lp://staging/~mbp/launchpad/891028-notunique | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
41 lines (+4/-10) 1 file modified
lib/lp/testing/factory.py (+4/-10) |
||||
To merge this branch: | bzr merge lp://staging/~mbp/launchpad/891028-notunique | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle | Approve | ||
Review via email: mp+82480@code.staging.launchpad.net |
Commit message
[r=mwhudson][bug=891028] don't assume random integers are unique
Description of the change
"Unique" integers from randint won't always be unique: use a global counter to try to make sure they actually are unique.
To post a comment you must log in.
Can't you just use testtools. TestCase. getUniqueIntege r? That should be
unique across the process lifetime.