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

Method testReadBadFile

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

Source from the content-addressed store, hash-verified

123 self.assertEqual(bz2f.read(), self.TEXT)
124
125 def testReadBadFile(self):
126 self.createTempFile(streams=0, suffix=self.BAD_DATA)
127 with BZ2File(self.filename) as bz2f:
128 self.assertRaises(OSError, bz2f.read)
129
130 def testReadMultiStream(self):
131 self.createTempFile(streams=5)

Callers

nothing calls this directly

Calls 3

createTempFileMethod · 0.95
BZ2FileClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected