]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19724: clear out colliding temp module.
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 22 Nov 2013 20:55:23 +0000 (13:55 -0700)
committerEric Snow <ericsnowcurrently@gmail.com>
Fri, 22 Nov 2013 20:55:23 +0000 (13:55 -0700)
Lib/test/test_pkgutil.py

index 52dd0bc73c9c25d8c3301a30ac324a40bc5215e4..d73b2117d3ccdbb5ef8b2ab80cb604ccc96ff726 100644 (file)
@@ -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)