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

Method test_raw_file_io

Lib/test/test_io/test_general.py:284–294  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

282 self.assertRaises(ValueError, self.open, bytes_fn, 'w', encoding="utf-8")
283
284 def test_raw_file_io(self):
285 with self.open(os_helper.TESTFN, "wb", buffering=0) as f:
286 self.assertEqual(f.readable(), False)
287 self.assertEqual(f.writable(), True)
288 self.assertEqual(f.seekable(), True)
289 self.write_ops(f)
290 with self.open(os_helper.TESTFN, "rb", buffering=0) as f:
291 self.assertEqual(f.readable(), True)
292 self.assertEqual(f.writable(), False)
293 self.assertEqual(f.seekable(), True)
294 self.read_ops(f)
295
296 def test_buffered_file_io(self):
297 with self.open(os_helper.TESTFN, "wb") as f:

Callers

nothing calls this directly

Calls 7

write_opsMethod · 0.95
read_opsMethod · 0.95
openMethod · 0.45
assertEqualMethod · 0.45
readableMethod · 0.45
writableMethod · 0.45
seekableMethod · 0.45

Tested by

no test coverage detected