mirror of
https://github.com/python/cpython.git
synced 2025-11-15 00:00:00 +00:00
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
Use time.monotonic or time.time instead of time.clock.
This commit is contained in:
parent
40fe35a95e
commit
e1dc3d47e0
1 changed files with 4 additions and 1 deletions
|
|
@ -3164,7 +3164,10 @@ Foo
|
||||||
self.msgids = []
|
self.msgids = []
|
||||||
append = self.msgids.append
|
append = self.msgids.append
|
||||||
make_msgid = utils.make_msgid
|
make_msgid = utils.make_msgid
|
||||||
clock = time.clock
|
try:
|
||||||
|
clock = time.monotonic
|
||||||
|
except AttributeError:
|
||||||
|
clock = time.time
|
||||||
tfin = clock() + 3.0
|
tfin = clock() + 3.0
|
||||||
while clock() < tfin:
|
while clock() < tfin:
|
||||||
append(make_msgid(domain='testdomain-string'))
|
append(make_msgid(domain='testdomain-string'))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue