summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r--Lib/test/test_import.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index cdee38d..ffde136 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -54,6 +54,8 @@ class ImportTest(unittest.TestCase):
print("b =", b, file=f)
f.close()
+ if TESTFN in sys.modules:
+ del sys.modules[TESTFN]
try:
try:
mod = __import__(TESTFN)