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

Method testRead

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

Source from the content-addressed store, hash-verified

117 self.assertRaises(TypeError, BZ2File, os.devnull, "r", 3)
118
119 def testRead(self):
120 self.createTempFile()
121 with BZ2File(self.filename) as bz2f:
122 self.assertRaises(TypeError, bz2f.read, float())
123 self.assertEqual(bz2f.read(), self.TEXT)
124
125 def testReadBadFile(self):
126 self.createTempFile(streams=0, suffix=self.BAD_DATA)

Callers

nothing calls this directly

Calls 5

createTempFileMethod · 0.95
BZ2FileClass · 0.90
assertRaisesMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected