MCPcopy Index your code
hub / github.com/python/cpython / test_write

Method test_write

Lib/test/test_gzip.py:68–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers 12

test_readMethod · 0.95
test_read1Method · 0.95
test_appendMethod · 0.95
test_buffered_readerMethod · 0.95
test_readlineMethod · 0.95
test_readlinesMethod · 0.95
test_seek_readMethod · 0.95
test_seek_whenceMethod · 0.95
test_modeMethod · 0.95
test_textio_readlinesMethod · 0.95

Calls 5

writeMethod · 0.45
flushMethod · 0.45
filenoMethod · 0.45
fsyncMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected