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

Method test_closed

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

Source from the content-addressed store, hash-verified

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