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

Method test_float_timeout

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

Source from the content-addressed store, hash-verified

111 lock.release()
112
113 def test_float_timeout(self, r):
114 lock = self.get_lock(r, "foo", timeout=9.5)
115 assert lock.acquire(blocking=False)
116 assert 8 < r.pttl("foo") <= 9500
117 lock.release()
118
119 def test_blocking_timeout(self, r, fake_lock_time):
120 lock1 = self.get_lock(r, "foo")

Callers

nothing calls this directly

Calls 4

get_lockMethod · 0.95
pttlMethod · 0.80
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected