summaryrefslogtreecommitdiff
path: root/Lib/test/test_mailbox.py
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-09-01 14:22:36 +0300
committerPetri Lehtinen <petri@digip.org>2012-09-01 14:22:36 +0300
commit92ecb9733966c20fb628ce98e34647535b5f8e13 (patch)
tree62ddab4192f4510e0412b5a77f6975b63ac6aca7 /Lib/test/test_mailbox.py
parent05738d1a250d3733e67d0e487b460ce9559445c7 (diff)
downloadcpython-92ecb9733966c20fb628ce98e34647535b5f8e13.tar.gz
#15802: Fix test logic in TestMaildir.test_create_tmp
Diffstat (limited to 'Lib/test/test_mailbox.py')
-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 65120f7af9..b83e2c3d5a 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))