summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-18 05:21:07 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-18 05:21:07 (GMT)
commit629bcfb8f907cf25bcdadb6a3af5f154fc0d5550 (patch)
treecdddd6fa7b547e22066f3caed8501bab856d4d01 /Lib/test
parentffeb5938167a7f417c08cd63c8bf722fc61c88c5 (diff)
downloadcpython-629bcfb8f907cf25bcdadb6a3af5f154fc0d5550.zip
cpython-629bcfb8f907cf25bcdadb6a3af5f154fc0d5550.tar.gz
cpython-629bcfb8f907cf25bcdadb6a3af5f154fc0d5550.tar.bz2
Make this test succeed even when using "import test.test_zlib".
Diffstat (limited to 'Lib/test')
-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 62c2604..72dbcfa 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()