diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_gzip.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py index bb4ed49..81a4865 100644 --- a/Lib/test/test_gzip.py +++ b/Lib/test/test_gzip.py @@ -16,8 +16,16 @@ data2 = """/* zlibmodule.c -- gzip-compatible data compression */ /* See http://www.winimage.com/zLibDll for Windows */ """ -f = gzip.GzipFile(filename, 'wb') ; f.write(data1 * 50) ; f.close() +f = gzip.GzipFile(filename, 'wb') ; f.write(data1 * 50) +# Try flush and fileno. +f.flush() +f.fileno() +if hasattr(os, 'fsync'): + os.fsync(f.fileno()) +f.close() + +# Try reading. f = gzip.GzipFile(filename, 'r') ; d = f.read() ; f.close() verify(d == data1*50) |