summaryrefslogtreecommitdiff
path: root/Lib/test/test_zlib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-18 05:21:07 +0000
committerGuido van Rossum <guido@python.org>1997-12-18 05:21:07 +0000
commit629bcfb8f907cf25bcdadb6a3af5f154fc0d5550 (patch)
treecdddd6fa7b547e22066f3caed8501bab856d4d01 /Lib/test/test_zlib.py
parentffeb5938167a7f417c08cd63c8bf722fc61c88c5 (diff)
downloadcpython-git-629bcfb8f907cf25bcdadb6a3af5f154fc0d5550.tar.gz
Make this test succeed even when using "import test.test_zlib".
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r--Lib/test/test_zlib.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 62c26048eb..72dbcfa20a 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -3,8 +3,11 @@ import sys
import imp
import string
-t = imp.find_module('test_zlib')
-file = t[0]
+try:
+ t = imp.find_module('test_zlib')
+ file = t[0]
+except ImportError:
+ file = open(__file__)
buf = file.read() * 8
file.close()