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

Method test_closed

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

Source from the content-addressed store, hash-verified

712 f.close()
713
714 def test_closed(self):
715 f = LZMAFile(BytesIO(COMPRESSED_XZ))
716 try:
717 self.assertFalse(f.closed)
718 f.read()
719 self.assertFalse(f.closed)
720 finally:
721 f.close()
722 self.assertTrue(f.closed)
723
724 f = LZMAFile(BytesIO(), "w")
725 try:
726 self.assertFalse(f.closed)
727 finally:
728 f.close()
729 self.assertTrue(f.closed)
730
731 def test_fileno(self):
732 f = LZMAFile(BytesIO(COMPRESSED_XZ))

Callers

nothing calls this directly

Calls 6

readMethod · 0.95
closeMethod · 0.95
LZMAFileClass · 0.90
BytesIOClass · 0.90
assertFalseMethod · 0.80
assertTrueMethod · 0.80

Tested by

no test coverage detected