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

Method test_lock_unlock

Lib/test/test_mailbox.py:517–523  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

515 self._box.flush()
516
517 def test_lock_unlock(self):
518 # Lock and unlock the mailbox
519 self.assertFalse(os.path.exists(self._get_lock_path()))
520 self._box.lock()
521 self.assertTrue(os.path.exists(self._get_lock_path()))
522 self._box.unlock()
523 self.assertFalse(os.path.exists(self._get_lock_path()))
524
525 def test_close(self):
526 # Close mailbox and flush changes to disk

Callers

nothing calls this directly

Calls 6

_get_lock_pathMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
existsMethod · 0.45
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected