(self, r)
| 131 | lock1.release() |
| 132 | |
| 133 | def test_context_manager(self, r): |
| 134 | # blocking_timeout prevents a deadlock if the lock can't be acquired |
| 135 | # for some reason |
| 136 | with self.get_lock(r, "foo", blocking_timeout=0.2) as lock: |
| 137 | assert r.get("foo") == lock.local.token |
| 138 | assert r.get("foo") is None |
| 139 | |
| 140 | def test_context_manager_blocking_timeout(self, r, fake_lock_time): |
| 141 | with self.get_lock(r, "foo", blocking=False): |