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

Method test_lock_unlock

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

Source from the content-addressed store, hash-verified

516 self._box.flush()
517
518 def test_lock_unlock(self):
519 # Lock and unlock the mailbox
520 self.assertFalse(os.path.exists(self._get_lock_path()))
521 self._box.lock()
522 self.assertTrue(os.path.exists(self._get_lock_path()))
523 self._box.unlock()
524 self.assertFalse(os.path.exists(self._get_lock_path()))
525
526 def test_close(self):
527 # 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