]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use assertLessEqual to ease diagnosing of failures
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 29 Oct 2010 21:52:23 +0000 (21:52 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 29 Oct 2010 21:52:23 +0000 (21:52 +0000)
Lib/test/test_genericpath.py
Lib/test/test_posixpath.py

index 3be9c8992b5bbe63a734e94125e7746f80cf8a84..089477c736b42b46e5f5baca057e6ebd7bc3f9d5 100644 (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:
index 6123ae25904d9ffb8a27dbe44fc84ef2b3020fe3..14146db4b212d9dbd2dcfbc38e2791084c9e1653 100644 (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: