summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_locks.py
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2023-02-17 15:18:47 (GMT)
committerGitHub <noreply@github.com>2023-02-17 15:18:47 (GMT)
commitf482ade4c7887c49dfd8bba3be76f839e562608d (patch)
tree1ad2cf423d41506c65b8b2d76a4a80daa4203e17 /Lib/test/test_importlib/test_locks.py
parent072011b3c38f871cdc3ab62630ea2234d09456d1 (diff)
downloadcpython-f482ade4c7887c49dfd8bba3be76f839e562608d.zip
cpython-f482ade4c7887c49dfd8bba3be76f839e562608d.tar.gz
cpython-f482ade4c7887c49dfd8bba3be76f839e562608d.tar.bz2
gh-101766: Fix refleak for _BlockingOnManager resources from test suite level (gh-101988)
Diffstat (limited to 'Lib/test/test_importlib/test_locks.py')
-rw-r--r--Lib/test/test_importlib/test_locks.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_locks.py b/Lib/test/test_importlib/test_locks.py
index 56d73c4..ba9cf51 100644
--- a/Lib/test/test_importlib/test_locks.py
+++ b/Lib/test/test_importlib/test_locks.py
@@ -33,6 +33,11 @@ class ModuleLockAsRLockTests:
test_repr = None
test_locked_repr = None
+ def tearDown(self):
+ for splitinit in init.values():
+ splitinit._bootstrap._blocking_on.clear()
+
+
LOCK_TYPES = {kind: splitinit._bootstrap._ModuleLock
for kind, splitinit in init.items()}