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

Method test_open_unbuffered

Lib/test/test_pathlib/test_pathlib.py:1328–1332  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1326 self.assertEqual(f.read().strip(), b"this is file A")
1327
1328 def test_open_unbuffered(self):
1329 p = self.cls(self.base)
1330 with (p / 'fileA').open('rb', buffering=0) as f:
1331 self.assertIsInstance(f, io.RawIOBase)
1332 self.assertEqual(f.read().strip(), b"this is file A")
1333
1334 def test_copy_file_preserve_metadata(self):
1335 base = self.cls(self.base)

Callers

nothing calls this directly

Calls 6

assertIsInstanceMethod · 0.80
clsMethod · 0.45
openMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected