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

Method test_byte_stream

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

Source from the content-addressed store, hash-verified

382 "This is a character stream.")
383
384 def test_byte_stream(self):
385 # If the source is an InputSource that does not have a character
386 # stream but does have a byte stream, use the byte stream.
387 src = InputSource(self.file)
388 src.setByteStream(self.make_byte_stream())
389 prep = prepare_input_source(src)
390 self.assertIsNone(prep.getCharacterStream())
391 self.checkContent(prep.getByteStream(),
392 b"This is a byte stream.")
393
394 def test_system_id(self):
395 # If the source is an InputSource that has neither a character

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected