Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d25cfe6 commit 2dd254dCopy full SHA for 2dd254d
1 file changed
Lib/test/test_time.py
@@ -332,11 +332,16 @@ def test_mktime_error(self):
332
self.assertEqual(time.strftime('%Z', tt), tzname)
333
334
def test_wallclock(self):
335
- t0 = time.wallclock()
336
- time.sleep(0.1)
337
t1 = time.wallclock()
338
- t = t1 - t0
339
- self.assertAlmostEqual(t, 0.1, delta=0.2)
+ t2 = time.wallclock()
+ self.assertGreater(t2, t1)
+
+ t1 = time.wallclock()
340
+ time.sleep(0.1)
341
342
343
+ dt = t2 - t1
344
+ self.assertAlmostEqual(dt, 0.1, delta=0.2)
345
346
347
class TestLocale(unittest.TestCase):
0 commit comments