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

Method test_closed

Lib/test/test_zstd.py:1738–1753  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1736 os.remove(filename)
1737
1738 def test_closed(self):
1739 f = ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB))
1740 try:
1741 self.assertFalse(f.closed)
1742 f.read()
1743 self.assertFalse(f.closed)
1744 finally:
1745 f.close()
1746 self.assertTrue(f.closed)
1747
1748 f = ZstdFile(io.BytesIO(), "w")
1749 try:
1750 self.assertFalse(f.closed)
1751 finally:
1752 f.close()
1753 self.assertTrue(f.closed)
1754
1755 def test_fileno(self):
1756 # 1

Callers

nothing calls this directly

Calls 5

readMethod · 0.95
closeMethod · 0.95
ZstdFileClass · 0.90
assertFalseMethod · 0.80
assertTrueMethod · 0.80

Tested by

no test coverage detected