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

Method testRead

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

Source from the content-addressed store, hash-verified

107 self.assertRaises(TypeError, BZ2File, os.devnull, "r", 3)
108
109 def testRead(self):
110 self.createTempFile()
111 with BZ2File(self.filename) as bz2f:
112 self.assertRaises(TypeError, bz2f.read, float())
113 self.assertEqual(bz2f.read(), self.TEXT)
114
115 def testReadBadFile(self):
116 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