commit | 629bcfb8f907cf25bcdadb6a3af5f154fc0d5550 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Dec 18 05:21:07 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Dec 18 05:21:07 1997 +0000 |
tree | cdddd6fa7b547e22066f3caed8501bab856d4d01 | |
parent | ffeb5938167a7f417c08cd63c8bf722fc61c88c5 [diff] [blame] |
Make this test succeed even when using "import test.test_zlib".
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 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()