summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pkgutil.py
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2013-11-22 20:55:23 (GMT)
committerEric Snow <ericsnowcurrently@gmail.com>2013-11-22 20:55:23 (GMT)
commit2ba66ebc20347671082094aac538f13e1fa1fcca (patch)
treef3e1e526e2318a095eda1e24471bbded4ca63251 /Lib/test/test_pkgutil.py
parent9ae874207512835c321287776a58cf088a428553 (diff)
downloadcpython-2ba66ebc20347671082094aac538f13e1fa1fcca.zip
cpython-2ba66ebc20347671082094aac538f13e1fa1fcca.tar.gz
cpython-2ba66ebc20347671082094aac538f13e1fa1fcca.tar.bz2
Issue #19724: clear out colliding temp module.
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r--Lib/test/test_pkgutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index 52dd0bc..d73b211 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -200,6 +200,8 @@ class ExtendPathTests(unittest.TestCase):
dirname = self.create_init(pkgname)
pathitem = os.path.join(dirname, pkgname)
fullname = '{}.{}'.format(pkgname, modname)
+ sys.modules.pop(fullname, None)
+ sys.modules.pop(pkgname, None)
try:
self.create_submodule(dirname, pkgname, modname, 0)