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

Method test_readable

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

Source from the content-addressed store, hash-verified

1844 self.assertRaises(ValueError, f.seekable)
1845
1846 def test_readable(self):
1847 f = ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB))
1848 try:
1849 self.assertTrue(f.readable())
1850 f.read()
1851 self.assertTrue(f.readable())
1852 finally:
1853 f.close()
1854 self.assertRaises(ValueError, f.readable)
1855
1856 f = ZstdFile(io.BytesIO(), "w")
1857 try:
1858 self.assertFalse(f.readable())
1859 finally:
1860 f.close()
1861 self.assertRaises(ValueError, f.readable)
1862
1863 def test_writable(self):
1864 f = ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB))

Callers

nothing calls this directly

Calls 7

readableMethod · 0.95
readMethod · 0.95
closeMethod · 0.95
ZstdFileClass · 0.90
assertTrueMethod · 0.80
assertFalseMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected