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

Method test_closed

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

Source from the content-addressed store, hash-verified

722 f.close()
723
724 def test_closed(self):
725 f = LZMAFile(BytesIO(COMPRESSED_XZ))
726 try:
727 self.assertFalse(f.closed)
728 f.read()
729 self.assertFalse(f.closed)
730 finally:
731 f.close()
732 self.assertTrue(f.closed)
733
734 f = LZMAFile(BytesIO(), "w")
735 try:
736 self.assertFalse(f.closed)
737 finally:
738 f.close()
739 self.assertTrue(f.closed)
740
741 def test_fileno(self):
742 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