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

Method test_read1_10

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

Source from the content-addressed store, hash-verified

997 self.assertEqual(f.read1(0), b"")
998
999 def test_read1_10(self):
1000 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
1001 blocks = []
1002 while result := f.read1(10):
1003 blocks.append(result)
1004 self.assertEqual(b"".join(blocks), INPUT)
1005 self.assertEqual(f.read1(), b"")
1006
1007 def test_read1_multistream(self):
1008 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