summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-10 17:50:14 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-10 17:50:14 (GMT)
commite1dc3d47e0a5cc4b390cc9eb70c5a5153c309cb2 (patch)
treeb6f873163f4a260c1053ca5b957b6d2f467d35bb /Lib
parent40fe35a95ee67721720f2aa9b5059417b4637ee1 (diff)
downloadcpython-e1dc3d47e0a5cc4b390cc9eb70c5a5153c309cb2.zip
cpython-e1dc3d47e0a5cc4b390cc9eb70c5a5153c309cb2.tar.gz
cpython-e1dc3d47e0a5cc4b390cc9eb70c5a5153c309cb2.tar.bz2
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
Use time.monotonic or time.time instead of time.clock.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_email/test_email.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index e4541fb..84f4e38 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -3164,7 +3164,10 @@ Foo
self.msgids = []
append = self.msgids.append
make_msgid = utils.make_msgid
- clock = time.clock
+ try:
+ clock = time.monotonic
+ except AttributeError:
+ clock = time.time
tfin = clock() + 3.0
while clock() < tfin:
append(make_msgid(domain='testdomain-string'))