summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threaded_import.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_threaded_import.py')
-rw-r--r--Lib/test/test_threaded_import.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py
index a4cf1d7..75c66b0 100644
--- a/Lib/test/test_threaded_import.py
+++ b/Lib/test/test_threaded_import.py
@@ -230,7 +230,8 @@ class ThreadedImportTests(unittest.TestCase):
import random
t = threading.Thread(target=target)
t.start()
- t.join()"""
+ t.join()
+ t = None"""
sys.path.insert(0, os.curdir)
self.addCleanup(sys.path.remove, os.curdir)
filename = TESTFN + ".py"
@@ -241,6 +242,7 @@ class ThreadedImportTests(unittest.TestCase):
self.addCleanup(rmtree, '__pycache__')
importlib.invalidate_caches()
__import__(TESTFN)
+ del sys.modules[TESTFN]
@reap_threads