summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-21 00:13:22 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-21 00:13:22 (GMT)
commitf58f1c33c115a4f9dfb8ff2b753241d08f46aace (patch)
treebe66772b0019829c9d6990eb8600fb02d5732306 /Lib/test
parentce77defd845b56a1910143568e5827c66dfca1ae (diff)
downloadcpython-f58f1c33c115a4f9dfb8ff2b753241d08f46aace.zip
cpython-f58f1c33c115a4f9dfb8ff2b753241d08f46aace.tar.gz
cpython-f58f1c33c115a4f9dfb8ff2b753241d08f46aace.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.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 5974c8b..a66738a 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -25,11 +25,6 @@ import StringIO
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):
@@ -463,19 +458,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:
test_support.run_unittest(
UncompressedZipImportTestCase,