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

Method test_open_unbuffered

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

Source from the content-addressed store, hash-verified

1317 self.assertEqual(f.read().strip(), b"this is file A")
1318
1319 def test_open_unbuffered(self):
1320 p = self.cls(self.base)
1321 with (p / 'fileA').open('rb', buffering=0) as f:
1322 self.assertIsInstance(f, io.RawIOBase)
1323 self.assertEqual(f.read().strip(), b"this is file A")
1324
1325 def test_copy_file_preserve_metadata(self):
1326 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