MCPcopy Index your code
hub / github.com/python/cpython / assertTimeout

Method assertTimeout

Lib/test/lock_tests.py:103–109  ·  view source on GitHub ↗
(self, actual, expected)

Source from the content-addressed store, hash-verified

101 support.reap_children()
102
103 def assertTimeout(self, actual, expected):
104 # The waiting and/or time.monotonic() can be imprecise, which
105 # is why comparing to the expected value would sometimes fail
106 # (especially under Windows).
107 self.assertGreaterEqual(actual, expected * 0.6)
108 # Test nothing insane happened
109 self.assertLess(actual, expected * 10.0)
110
111
112class BaseLockTests(BaseTestCase):

Callers 5

test_timeoutMethod · 0.80
test_timeoutMethod · 0.80
test_timeoutMethod · 0.80
fMethod · 0.80
test_acquire_timeoutMethod · 0.80

Calls 2

assertGreaterEqualMethod · 0.80
assertLessMethod · 0.45

Tested by

no test coverage detected