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

Method test_binary_file

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

Source from the content-addressed store, hash-verified

415 b"This was read from a file.")
416
417 def test_binary_file(self):
418 # If the source is a binary file-like object, use it as a byte
419 # stream.
420 prep = prepare_input_source(self.make_byte_stream())
421 self.assertIsNone(prep.getCharacterStream())
422 self.checkContent(prep.getByteStream(),
423 b"This is a byte stream.")
424
425 def test_text_file(self):
426 # 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