MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_state_after_timeout

Method test_state_after_timeout

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

Source from the content-addressed store, hash-verified

301 lock.release()
302
303 def test_state_after_timeout(self):
304 # Issue #11618: check that lock is in a proper state after a
305 # (non-zero) timeout.
306 lock = self.locktype()
307 lock.acquire()
308 self.assertFalse(lock.acquire(timeout=0.01))
309 lock.release()
310 self.assertFalse(lock.locked())
311 self.assertTrue(lock.acquire(blocking=False))
312
313 @requires_fork
314 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