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

Method test_lock

Lib/test/_test_multiprocessing.py:1445–1450  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1443 p.terminate()
1444
1445 def test_lock(self):
1446 lock = self.Lock()
1447 self.assertEqual(lock.acquire(), True)
1448 self.assertEqual(lock.acquire(False), False)
1449 self.assertEqual(lock.release(), None)
1450 self.assertRaises((ValueError, threading.ThreadError), lock.release)
1451
1452 @staticmethod
1453 def _acquire_release(lock, timeout, l=None, n=1):

Callers

nothing calls this directly

Calls 5

acquireMethod · 0.95
releaseMethod · 0.95
LockMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected