diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-10 17:50:14 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-10 17:50:14 (GMT) |
commit | e1dc3d47e0a5cc4b390cc9eb70c5a5153c309cb2 (patch) | |
tree | b6f873163f4a260c1053ca5b957b6d2f467d35bb | |
parent | 40fe35a95ee67721720f2aa9b5059417b4637ee1 (diff) | |
download | cpython-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.
-rw-r--r-- | Lib/test/test_email/test_email.py | 5 |
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')) |