diff options
-rw-r--r-- | Lib/test/test_zlib.py | 7 |
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() |