summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipimport.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-11-18 23:00:55 (GMT)
committerJust van Rossum <just@letterror.com>2003-11-18 23:00:55 (GMT)
commit59498542007400342e362f33a3e52bccb96ad04f (patch)
tree146f4e406b7dd389a07fabaa109d134814f707fa /Lib/test/test_zipimport.py
parent4e6b3c55d0a045e37725a0eb6c7a0dfcd4d4084b (diff)
downloadcpython-59498542007400342e362f33a3e52bccb96ad04f.zip
cpython-59498542007400342e362f33a3e52bccb96ad04f.tar.gz
cpython-59498542007400342e362f33a3e52bccb96ad04f.tar.bz2
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. Will backport.
Diffstat (limited to 'Lib/test/test_zipimport.py')
-rw-r--r--Lib/test/test_zipimport.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 86acdd2..21bde68 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)}