Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b6d0f commit 052364bCopy full SHA for 052364b
1 file changed
Lib/test/test_gzip.py
@@ -16,15 +16,15 @@
16
/* See http://www.winimage.com/zLibDll for Windows */
17
"""
18
19
-f = gzip.GzipFile(filename, 'w') ; f.write(data1) ; f.close()
+f = gzip.GzipFile(filename, 'wb') ; f.write(data1) ; f.close()
20
21
-f = gzip.GzipFile(filename, 'r') ; d = f.read() ; f.close()
+f = gzip.GzipFile(filename, 'rb') ; d = f.read() ; f.close()
22
assert d == data1
23
24
# Append to the previous file
25
-f = gzip.GzipFile(filename, 'a') ; f.write(data2) ; f.close()
+f = gzip.GzipFile(filename, 'ab') ; f.write(data2) ; f.close()
26
27
28
assert d == data1+data2
29
30
os.unlink( filename )
0 commit comments