diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-19 22:22:39 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-19 22:22:39 (GMT) |
commit | 21809a693836ddaa635e72291dbe872adf31cfcd (patch) | |
tree | e4f7cfd8653fa83e0def6e1712da63066470bae0 /Lib | |
parent | f966803c0855135242c16417d94261a15384bd54 (diff) | |
parent | 4445ec81c17c672b5d245da7a1af0e0294debcc0 (diff) | |
download | cpython-21809a693836ddaa635e72291dbe872adf31cfcd.zip cpython-21809a693836ddaa635e72291dbe872adf31cfcd.tar.gz cpython-21809a693836ddaa635e72291dbe872adf31cfcd.tar.bz2 |
(Merge 3.2) Issue #12124: zipimport doesn't keep a reference to
zlib.decompress() anymore to be able to unload the module.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_zipimport.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py index 5aab6b4..ab669cf 100644 --- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -19,11 +19,6 @@ import io from traceback import extract_tb, extract_stack, print_tb raise_src = 'def do_raise(): raise TypeError\n' -# so we only run testAFakeZlib once if this test is run repeatedly -# which happens when we look for ref leaks -test_imported = False - - def make_pyc(co, mtime): data = marshal.dumps(co) if type(mtime) is type(0.0): @@ -467,19 +462,7 @@ class BadFileZipImportTestCase(unittest.TestCase): zipimport._zip_directory_cache.clear() -def cleanup(): - # this is necessary if test is run repeated (like when finding leaks) - global test_imported - if test_imported: - zipimport._zip_directory_cache.clear() - if hasattr(UncompressedZipImportTestCase, 'testAFakeZlib'): - delattr(UncompressedZipImportTestCase, 'testAFakeZlib') - if hasattr(CompressedZipImportTestCase, 'testAFakeZlib'): - delattr(CompressedZipImportTestCase, 'testAFakeZlib') - test_imported = True - def test_main(): - cleanup() try: support.run_unittest( UncompressedZipImportTestCase, |