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

Method test_read1_10

Lib/test/test_lzma.py:1009–1015  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1007 self.assertEqual(f.read1(0), b"")
1008
1009 def test_read1_10(self):
1010 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1011 blocks = []
1012 while result := f.read1(10):
1013 blocks.append(result)
1014 self.assertEqual(b"".join(blocks), INPUT)
1015 self.assertEqual(f.read1(), b"")
1016
1017 def test_read1_multistream(self):
1018 with LZMAFile(BytesIO(COMPRESSED_XZ * 5)) as f:

Callers

nothing calls this directly

Calls 6

LZMAFileClass · 0.90
BytesIOClass · 0.90
read1Method · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected