mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merged revisions 76240 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r76240 | antoine.pitrou | 2009-11-13 17:29:04 +0100 (ven., 13 nov. 2009) | 6 lines Issue #6551: test_zipimport could import and then destroy some modules of the encodings package, which would make other tests fail further down the road because the internally cached encoders and decoders would point to empty global variables. ........
This commit is contained in:
parent
8f6713f46d
commit
ca15409195
4 changed files with 26 additions and 7 deletions
|
@ -48,13 +48,11 @@ class TestPkg(unittest.TestCase):
|
|||
self.root = None
|
||||
self.pkgname = None
|
||||
self.syspath = list(sys.path)
|
||||
self.sysmodules = sys.modules.copy()
|
||||
self.modules_before = support.modules_setup()
|
||||
|
||||
def tearDown(self):
|
||||
sys.path[:] = self.syspath
|
||||
sys.modules.clear()
|
||||
sys.modules.update(self.sysmodules)
|
||||
del self.sysmodules
|
||||
support.modules_cleanup(*self.modules_before)
|
||||
cleanout(self.root)
|
||||
|
||||
# delete all modules concerning the tested hiearchy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue