diff options
-rw-r--r-- | Lib/test/test_pkgutil.py | 2 |
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) |