MCPcopy
hub / github.com/redis/redis-py / test_locked

Method test_locked

tests/test_lock.py:65–71  ·  view source on GitHub ↗
(self, r)

Source from the content-addressed store, hash-verified

63 assert lock.local.token is None
64
65 def test_locked(self, r):
66 lock = self.get_lock(r, "foo")
67 assert lock.locked() is False
68 lock.acquire(blocking=False)
69 assert lock.locked() is True
70 lock.release()
71 assert lock.locked() is False
72
73 def _test_owned(self, client):
74 lock = self.get_lock(client, "foo")

Callers

nothing calls this directly

Calls 4

get_lockMethod · 0.95
lockedMethod · 0.45
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected