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

Method test_read1_multistream

Lib/test/test_zstd.py:1994–2003  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1992 self.assertEqual(f.read1(), b"")
1993
1994 def test_read1_multistream(self):
1995 with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB * 5)) as f:
1996 blocks = []
1997 while True:
1998 result = f.read1()
1999 if not result:
2000 break
2001 blocks.append(result)
2002 self.assertEqual(b"".join(blocks), DECOMPRESSED_100_PLUS_32KB * 5)
2003 self.assertEqual(f.read1(), b"")
2004
2005 def test_read1_bad_args(self):
2006 f = ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB))

Callers

nothing calls this directly

Calls 5

ZstdFileClass · 0.90
read1Method · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected