diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-12 19:53:03 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-12 19:53:03 (GMT) |
commit | db4a2ef23a730a518f34310ff53d9540324b2d95 (patch) | |
tree | ebdd0fe6785faed311a2643510ad6502069d810d /Lib/test/test_pkg.py | |
parent | f19169f2d5772db906b118039f8b43232357c45f (diff) | |
download | cpython-db4a2ef23a730a518f34310ff53d9540324b2d95.zip cpython-db4a2ef23a730a518f34310ff53d9540324b2d95.tar.gz cpython-db4a2ef23a730a518f34310ff53d9540324b2d95.tar.bz2 |
Another fix for #1414
Diffstat (limited to 'Lib/test/test_pkg.py')
-rw-r--r-- | Lib/test/test_pkg.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py index 1e32d2c..fde99dc 100644 --- a/Lib/test/test_pkg.py +++ b/Lib/test/test_pkg.py @@ -43,14 +43,18 @@ def fixdir(lst): # from package import * (defined in __init__) -class Test(unittest.TestCase): +class TestPkg(unittest.TestCase): def setUp(self): self.root = None self.syspath = list(sys.path) + self.sysmodules = sys.modules.copy() def tearDown(self): sys.path[:] = self.syspath + sys.modules.clear() + sys.modules.update(self.sysmodules) + del self.sysmodules cleanout(self.root) def run_code(self, code): |