From: Guido van Rossum Date: Thu, 18 Dec 1997 05:21:07 +0000 (+0000) Subject: Make this test succeed even when using "import test.test_zlib". X-Git-Tag: v1.5~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=629bcfb8f907cf25bcdadb6a3af5f154fc0d5550;p=thirdparty%2FPython%2Fcpython.git 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 62c26048eb8e..72dbcfa20a16 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()