summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-09-01 11:22:36 (GMT)
committerPetri Lehtinen <petri@digip.org>2012-09-01 11:22:36 (GMT)
commit1c371b255ff15971f2aac1f1ff4a248718744af3 (patch)
tree547147176ba9914297f8546f980d24845daee5d7 /Lib
parent6fb8fb17bff87fdd5e738430502f34f8729766e3 (diff)
downloadcpython-1c371b255ff15971f2aac1f1ff4a248718744af3.zip
cpython-1c371b255ff15971f2aac1f1ff4a248718744af3.tar.gz
cpython-1c371b255ff15971f2aac1f1ff4a248718744af3.tar.bz2
#15802: Fix test logic in TestMaildir.test_create_tmp
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_mailbox.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 65120f7..b83e2c3 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -759,13 +759,13 @@ class TestMaildir(TestMailbox, unittest.TestCase):
self.assertIsNot(match, None, "Invalid file name: '%s'" % tail)
groups = match.groups()
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'" %
(previous_groups[0], groups[0]))
- self.assertTrue(int(groups[1] >= previous_groups[1]) or
- groups[0] != groups[1],
- "Non-monotonic milliseconds: '%s' before '%s'" %
- (previous_groups[1], groups[1]))
+ if int(groups[0]) == int(previous_groups[0]):
+ self.assertGreaterEqual(int(groups[1]), int(previous_groups[1]),
+ "Non-monotonic milliseconds: '%s' before '%s'" %
+ (previous_groups[1], groups[1]))
self.assertEqual(int(groups[2]), pid,
"Process ID mismatch: '%s' should be '%s'" %
(groups[2], pid))