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

Method testPeekBytesIO

Lib/test/test_bz2.py:767–773  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

765 self.assertFalse(bio.closed)
766
767 def testPeekBytesIO(self):
768 with BytesIO(self.DATA) as bio:
769 with BZ2File(bio) as bz2f:
770 pdata = bz2f.peek()
771 self.assertNotEqual(len(pdata), 0)
772 self.assertStartsWith(self.TEXT, pdata)
773 self.assertEqual(bz2f.read(), self.TEXT)
774
775 def testWriteBytesIO(self):
776 with BytesIO() as bio:

Callers

nothing calls this directly

Calls 8

BytesIOClass · 0.90
BZ2FileClass · 0.90
lenFunction · 0.85
assertNotEqualMethod · 0.80
peekMethod · 0.45
assertStartsWithMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected