mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Use imp.find_module() as the most certain way to find the test data.
This commit is contained in:
parent
57fa217b01
commit
c95a6c1af5
1 changed files with 5 additions and 1 deletions
|
|
@ -1,7 +1,11 @@
|
|||
import zlib
|
||||
import sys
|
||||
import imp
|
||||
|
||||
buf = open(sys.argv[0]).read() * 8
|
||||
t = imp.find_module('test_zlib')
|
||||
file = t[0]
|
||||
buf = file.read() * 8
|
||||
file.close()
|
||||
|
||||
x = zlib.compress(buf)
|
||||
y = zlib.decompress(x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue