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

Method test_read1

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

Source from the content-addressed store, hash-verified

985 self.assertRaises(LZMAError, f.read)
986
987 def test_read1(self):
988 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
989 blocks = []
990 while result := f.read1():
991 blocks.append(result)
992 self.assertEqual(b"".join(blocks), INPUT)
993 self.assertEqual(f.read1(), b"")
994
995 def test_read1_0(self):
996 with LZMAFile(BytesIO(COMPRESSED_XZ)) 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