changeset: 99050:3c0a817ab616 branch: 3.4 parent: 99042:385b3aaf8401 user: Serhiy Storchaka date: Tue Nov 10 19:50:14 2015 +0200 files: Lib/test/test_email/test_email.py description: Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions. Use time.monotonic or time.time instead of time.clock. diff -r 385b3aaf8401 -r 3c0a817ab616 Lib/test/test_email/test_email.py --- a/Lib/test/test_email/test_email.py Tue Nov 10 15:30:35 2015 +0200 +++ b/Lib/test/test_email/test_email.py Tue Nov 10 19:50:14 2015 +0200 @@ -3164,7 +3164,10 @@ 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'))