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() f.close()
self.assertEqual(d, b"foobar") self.assertEqual(d, b"foobar")
self.assertTrue( self.assertLessEqual(
genericpath.getctime(support.TESTFN) <= genericpath.getctime(support.TESTFN),
genericpath.getmtime(support.TESTFN) genericpath.getmtime(support.TESTFN)
) )
finally: finally:

View File

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