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

Method test_path_objects

Lib/test/test_sax.py:418–423  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

416 b"This was read from a file.")
417
418 def test_path_objects(self):
419 # If the source is a Path object, use it as a system ID and open it.
420 prep = prepare_input_source(FakePath(self.file))
421 self.assertIsNone(prep.getCharacterStream())
422 self.checkContent(prep.getByteStream(),
423 b"This was read from a file.")
424
425 def test_binary_file(self):
426 # If the source is a binary file-like object, use it as a byte

Callers

nothing calls this directly

Calls 6

checkContentMethod · 0.95
prepare_input_sourceFunction · 0.90
FakePathClass · 0.90
assertIsNoneMethod · 0.80
getCharacterStreamMethod · 0.80
getByteStreamMethod · 0.80

Tested by

no test coverage detected