diff options
author | Petri Lehtinen <petri@digip.org> | 2012-09-01 11:27:24 (GMT) |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2012-09-01 11:27:24 (GMT) |
commit | 6f858a2eea0918af92673be6ed784f9fbe94134d (patch) | |
tree | 5115d754e56a5eca68a4788a996b352940584f64 /Lib/test/test_mailbox.py | |
parent | 64b0ef15097017b20b1edca1d3bc1e38d51feb10 (diff) | |
parent | 1c371b255ff15971f2aac1f1ff4a248718744af3 (diff) | |
download | cpython-6f858a2eea0918af92673be6ed784f9fbe94134d.zip cpython-6f858a2eea0918af92673be6ed784f9fbe94134d.tar.gz cpython-6f858a2eea0918af92673be6ed784f9fbe94134d.tar.bz2 |
#15802: Fix test logic in TestMaildir.test_create_tmp
Diffstat (limited to 'Lib/test/test_mailbox.py')
-rw-r--r-- | Lib/test/test_mailbox.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py index 5515357..fd7f319 100644 --- a/Lib/test/test_mailbox.py +++ b/Lib/test/test_mailbox.py @@ -763,13 +763,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)) |