We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed7855e commit 8bdc522Copy full SHA for 8bdc522
1 file changed
tests/test_sync_lock.py
@@ -108,3 +108,13 @@ def g():
108
with pytest.raises(lock.LockError):
109
with this_lock(timeout=0.01):
110
pass
111
+
112
+class DummyException(Exception):
113
+ pass
114
115
+def test_rlock_released_after_error(this_lock):
116
+ try:
117
+ with this_lock:
118
+ raise DummyException()
119
+ except DummyException:
120
+ assert not this_lock.locked()
0 commit comments