Use assertLessEqual to ease diagnosing of failures

This commit is contained in:
Antoine Pitrou 2010-10-29 21:52:23 +00:00
parent e0e34bbb64
commit 6acd432457
2 changed files with 4 additions and 4 deletions

View File

@ -50,8 +50,8 @@ class AllCommonTest(unittest.TestCase):
f.close()
self.assertEqual(d, b"foobar")
self.assertTrue(
genericpath.getctime(support.TESTFN) <=
self.assertLessEqual(
genericpath.getctime(support.TESTFN),
genericpath.getmtime(support.TESTFN)
)
finally:

View File

@ -229,8 +229,8 @@ class PosixPathTest(unittest.TestCase):
f.close()
self.assertEqual(d, b"foobar")
self.assertTrue(
posixpath.getctime(support.TESTFN) <=
self.assertLessEqual(
posixpath.getctime(support.TESTFN),
posixpath.getmtime(support.TESTFN)
)
finally: