Kaydet (Commit) 6f858a2e authored tarafından Petri Lehtinen's avatar Petri Lehtinen

#15802: Fix test logic in TestMaildir.test_create_tmp

...@@ -763,13 +763,13 @@ class TestMaildir(TestMailbox, unittest.TestCase): ...@@ -763,13 +763,13 @@ class TestMaildir(TestMailbox, unittest.TestCase):
self.assertIsNot(match, None, "Invalid file name: '%s'" % tail) self.assertIsNot(match, None, "Invalid file name: '%s'" % tail)
groups = match.groups() groups = match.groups()
if previous_groups is not None: if previous_groups is not None:
self.assertTrue(int(groups[0] >= previous_groups[0]), self.assertGreaterEqual(int(groups[0]), int(previous_groups[0]),
"Non-monotonic seconds: '%s' before '%s'" % "Non-monotonic seconds: '%s' before '%s'" %
(previous_groups[0], groups[0])) (previous_groups[0], groups[0]))
self.assertTrue(int(groups[1] >= previous_groups[1]) or if int(groups[0]) == int(previous_groups[0]):
groups[0] != groups[1], self.assertGreaterEqual(int(groups[1]), int(previous_groups[1]),
"Non-monotonic milliseconds: '%s' before '%s'" % "Non-monotonic milliseconds: '%s' before '%s'" %
(previous_groups[1], groups[1])) (previous_groups[1], groups[1]))
self.assertEqual(int(groups[2]), pid, self.assertEqual(int(groups[2]), pid,
"Process ID mismatch: '%s' should be '%s'" % "Process ID mismatch: '%s' should be '%s'" %
(groups[2], pid)) (groups[2], pid))
......
...@@ -28,6 +28,9 @@ Extension Modules ...@@ -28,6 +28,9 @@ Extension Modules
Tests Tests
----- -----
- Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch
by Serhiy Storchaka.
Build Build
----- -----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment