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

Method test_raw_file_io

Lib/test/test_io.py:589–599  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

587 self.assertRaises(ValueError, self.open, bytes_fn, 'w', encoding="utf-8")
588
589 def test_raw_file_io(self):
590 with self.open(os_helper.TESTFN, "wb", buffering=0) as f:
591 self.assertEqual(f.readable(), False)
592 self.assertEqual(f.writable(), True)
593 self.assertEqual(f.seekable(), True)
594 self.write_ops(f)
595 with self.open(os_helper.TESTFN, "rb", buffering=0) as f:
596 self.assertEqual(f.readable(), True)
597 self.assertEqual(f.writable(), False)
598 self.assertEqual(f.seekable(), True)
599 self.read_ops(f)
600
601 def test_buffered_file_io(self):
602 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