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

Method test_writable

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

Source from the content-addressed store, hash-verified

1861 self.assertRaises(ValueError, f.readable)
1862
1863 def test_writable(self):
1864 f = ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB))
1865 try:
1866 self.assertFalse(f.writable())
1867 f.read()
1868 self.assertFalse(f.writable())
1869 finally:
1870 f.close()
1871 self.assertRaises(ValueError, f.writable)
1872
1873 f = ZstdFile(io.BytesIO(), "w")
1874 try:
1875 self.assertTrue(f.writable())
1876 finally:
1877 f.close()
1878 self.assertRaises(ValueError, f.writable)
1879
1880 def test_read_0(self):
1881 with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB)) as f:

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected