(self)
| 66 | self.assertEqual(f.read(), b_data) |
| 67 | |
| 68 | def test_write(self): |
| 69 | with gzip.GzipFile(self.filename, 'wb') as f: |
| 70 | f.write(data1 * 50) |
| 71 | |
| 72 | # Try flush and fileno. |
| 73 | f.flush() |
| 74 | f.fileno() |
| 75 | if hasattr(os, 'fsync'): |
| 76 | os.fsync(f.fileno()) |
| 77 | f.close() |
| 78 | |
| 79 | # Test multiple close() calls. |
| 80 | f.close() |
| 81 | |
| 82 | def test_write_read_with_pathlike_file(self): |
| 83 | filename = os_helper.FakePath(self.filename) |
no test coverage detected