From: Just van Rossum Date: Tue, 18 Nov 2003 23:04:28 +0000 (+0000) Subject: Backport of fix for [ 765456 ]: testAFakeZlib failed on platforms that use X-Git-Tag: v2.3.3c1~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e00b9b56fe8df010c623f04f0c4ddf5b1f468eff;p=thirdparty%2FPython%2Fcpython.git Backport of fix for [ 765456 ]: testAFakeZlib failed on platforms that use a statically linked zlib module, but since the problem it tests can't exist on these systems, simply skip it then. --- diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py index 86acdd20918a..21bde6830ecc 100644 --- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -95,6 +95,13 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase): # (Hence the 'A' in the test method name: to make it the first # item in a list sorted by name, like unittest.makeSuite() does.) # + # This test fails on platforms on which the zlib module is + # statically linked, but the problem it tests for can't + # occur in that case (builtin modules are always found first), + # so we'll simply skip it then. Bug #765456. + # + if "zlib" in sys.builtin_module_names: + return if "zlib" in sys.modules: del sys.modules["zlib"] files = {"zlib.py": (NOW, test_src)}