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

Method test_read_bad_args

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

Source from the content-addressed store, hash-verified

1945 self.assertRaises(EOFError, f.read, 1)
1946
1947 def test_read_bad_args(self):
1948 f = ZstdFile(io.BytesIO(COMPRESSED_DAT))
1949 f.close()
1950 self.assertRaises(ValueError, f.read)
1951 with ZstdFile(io.BytesIO(), "w") as f:
1952 self.assertRaises(ValueError, f.read)
1953 with ZstdFile(io.BytesIO(COMPRESSED_DAT)) as f:
1954 self.assertRaises(TypeError, f.read, float())
1955
1956 def test_read_bad_data(self):
1957 with ZstdFile(io.BytesIO(COMPRESSED_BOGUS)) as f:

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
ZstdFileClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected