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

Method testFileno

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

Source from the content-addressed store, hash-verified

395 self.assertEqual(bz2f.read(), self.TEXT * 2)
396
397 def testFileno(self):
398 self.createTempFile()
399 with open(self.filename, 'rb') as rawf:
400 bz2f = BZ2File(rawf)
401 try:
402 self.assertEqual(bz2f.fileno(), rawf.fileno())
403 finally:
404 bz2f.close()
405 self.assertRaises(ValueError, bz2f.fileno)
406
407 def testSeekable(self):
408 bz2f = BZ2File(BytesIO(self.DATA))

Callers

nothing calls this directly

Calls 8

createTempFileMethod · 0.95
filenoMethod · 0.95
closeMethod · 0.95
BZ2FileClass · 0.90
openFunction · 0.50
assertEqualMethod · 0.45
filenoMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected