]> granicus.if.org Git - python/commitdiff
Issue #10278: wallclock() cannot go backward, but two consecutive calls
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 23 Jan 2012 22:48:41 +0000 (23:48 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 23 Jan 2012 22:48:41 +0000 (23:48 +0100)
may return the same time.

Lib/test/test_time.py

index d34b870f7322811f5732d2423be6a1ebd550db68..685e821d40fb95be9ec970658ec46af590f2d7bb 100644 (file)
@@ -334,7 +334,7 @@ class TimeTestCase(unittest.TestCase):
     def test_wallclock(self):
         t1 = time.wallclock()
         t2 = time.wallclock()
-        self.assertGreater(t2, t1)
+        self.assertGreaterEqual(t2, t1)
 
         t1 = time.wallclock()
         time.sleep(0.1)