We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70f4707 commit 55c71a3Copy full SHA for 55c71a3
vcr/patch.py
@@ -1,6 +1,7 @@
1
'''Utilities for patching in cassettes'''
2
import functools
3
import itertools
4
+import threading
5
6
from .compat import contextlib, mock
7
from .stubs import VCRHTTPConnection, VCRHTTPSConnection
@@ -447,9 +448,13 @@ def reset_patchers():
447
448
)
449
450
451
+_force_reset_lock = threading.RLock()
452
+
453
454
@contextlib.contextmanager
455
def force_reset():
456
with contextlib.ExitStack() as exit_stack:
457
+ exit_stack.enter_context(_force_reset_lock)
458
for patcher in reset_patchers():
459
exit_stack.enter_context(patcher)
460
yield
0 commit comments