From: Christian Heimes Date: Mon, 12 Nov 2007 19:53:03 +0000 (+0000) Subject: Another fix for #1414 X-Git-Tag: v3.0a2~197 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db4a2ef23a730a518f34310ff53d9540324b2d95;p=thirdparty%2FPython%2Fcpython.git Another fix for #1414 --- diff --git a/Lib/test/test_frozen.py b/Lib/test/test_frozen.py index 2de253556ac5..05e8e8cca658 100644 --- a/Lib/test/test_frozen.py +++ b/Lib/test/test_frozen.py @@ -4,7 +4,6 @@ from __future__ import with_statement from test.test_support import captured_stdout, run_unittest import unittest import sys, os -import warnings class FrozenTests(unittest.TestCase): def test_frozen(self): diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py index 1e32d2c2bb25..fde99dc4ff98 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):