Skip to content

Commit e1dc3d4

Browse files
Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
Use time.monotonic or time.time instead of time.clock.
1 parent 40fe35a commit e1dc3d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_email/test_email.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3164,7 +3164,10 @@ def run(self):
31643164
self.msgids = []
31653165
append = self.msgids.append
31663166
make_msgid = utils.make_msgid
3167-
clock = time.clock
3167+
try:
3168+
clock = time.monotonic
3169+
except AttributeError:
3170+
clock = time.time
31683171
tfin = clock() + 3.0
31693172
while clock() < tfin:
31703173
append(make_msgid(domain='testdomain-string'))

0 commit comments

Comments
 (0)