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

Method testSeekPostEnd

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

Source from the content-addressed store, hash-verified

351 self.assertEqual(bz2f.read(), (self.TEXT * 2)[-1000:])
352
353 def testSeekPostEnd(self):
354 self.createTempFile()
355 with BZ2File(self.filename) as bz2f:
356 bz2f.seek(150000)
357 self.assertEqual(bz2f.tell(), len(self.TEXT))
358 self.assertEqual(bz2f.read(), b"")
359
360 def testSeekPostEndMultiStream(self):
361 self.createTempFile(streams=5)

Callers

nothing calls this directly

Calls 6

createTempFileMethod · 0.95
BZ2FileClass · 0.90
seekMethod · 0.45
assertEqualMethod · 0.45
tellMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected