MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_write

Method test_write

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

Source from the content-addressed store, hash-verified

67 self.assertEqual(f.read(), b_data)
68
69 def test_write(self):
70 with gzip.GzipFile(self.filename, 'wb') as f:
71 f.write(data1 * 50)
72
73 # Try flush and fileno.
74 f.flush()
75 f.fileno()
76 if hasattr(os, 'fsync'):
77 os.fsync(f.fileno())
78 f.close()
79
80 # Test multiple close() calls.
81 f.close()
82
83 def test_write_read_with_pathlike_file(self):
84 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

hasattrFunction · 0.85
writeMethod · 0.45
flushMethod · 0.45
filenoMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected