mirror of https://github.com/python/cpython
Use assertLessEqual to ease diagnosing of failures
This commit is contained in:
parent
e0e34bbb64
commit
6acd432457
|
@ -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:
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue