diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-19 22:16:09 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-19 22:16:09 (GMT) |
commit | 4925cde1cc20fe559b9c1429a99bf9b1c17f7048 (patch) | |
tree | c12bdc58924c3771db0720d7ec5dff91d2664cfc /Lib/test | |
parent | ae8856fe363c65c66f3ae61b57ea2af886c61e32 (diff) | |
download | cpython-4925cde1cc20fe559b9c1429a99bf9b1c17f7048.zip cpython-4925cde1cc20fe559b9c1429a99bf9b1c17f7048.tar.gz cpython-4925cde1cc20fe559b9c1429a99bf9b1c17f7048.tar.bz2 |
Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
to be able to unload the module.
Diffstat (limited to 'Lib/test')
-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 ebf6ad4..71d5a51 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): @@ -453,19 +448,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, |