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

Method test_readable

Lib/test/test_lzma.py:773–788  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

771 self.assertRaises(ValueError, f.seekable)
772
773 def test_readable(self):
774 f = LZMAFile(BytesIO(COMPRESSED_XZ))
775 try:
776 self.assertTrue(f.readable())
777 f.read()
778 self.assertTrue(f.readable())
779 finally:
780 f.close()
781 self.assertRaises(ValueError, f.readable)
782
783 f = LZMAFile(BytesIO(), "w")
784 try:
785 self.assertFalse(f.readable())
786 finally:
787 f.close()
788 self.assertRaises(ValueError, f.readable)
789
790 def test_writable(self):
791 f = LZMAFile(BytesIO(COMPRESSED_XZ))

Callers

nothing calls this directly

Calls 8

readableMethod · 0.95
readMethod · 0.95
closeMethod · 0.95
LZMAFileClass · 0.90
BytesIOClass · 0.90
assertTrueMethod · 0.80
assertFalseMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected