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

Method test_state_after_timeout

Lib/test/lock_tests.py:306–314  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

304 lock.release()
305
306 def test_state_after_timeout(self):
307 # Issue #11618: check that lock is in a proper state after a
308 # (non-zero) timeout.
309 lock = self.locktype()
310 lock.acquire()
311 self.assertFalse(lock.acquire(timeout=0.01))
312 lock.release()
313 self.assertFalse(lock.locked())
314 self.assertTrue(lock.acquire(blocking=False))
315
316 @requires_fork
317 def test_at_fork_reinit(self):

Callers

nothing calls this directly

Calls 5

assertFalseMethod · 0.80
assertTrueMethod · 0.80
acquireMethod · 0.45
releaseMethod · 0.45
lockedMethod · 0.45

Tested by

no test coverage detected