diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py index d5d7448ac8a..6025bcd0742 100644 --- a/Lib/test/test_pkgutil.py +++ b/Lib/test/test_pkgutil.py @@ -165,6 +165,9 @@ class ExtendPathTests(unittest.TestCase): def tearDown(self): del sys.path[0] del sys.path[0] + del sys.modules['foo'] + del sys.modules['foo.bar'] + del sys.modules['foo.baz'] def test_simple(self): self.create_submodule(self.dirname_0, self.pkgname, 'bar', 0)