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

Method test_binary_file

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

Source from the content-addressed store, hash-verified

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
427 # stream.
428 prep = prepare_input_source(self.make_byte_stream())
429 self.assertIsNone(prep.getCharacterStream())
430 self.checkContent(prep.getByteStream(),
431 b"This is a byte stream.")
432
433 def test_text_file(self):
434 # If the source is a text file-like object, use it as a character

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected