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

Method test_read_bad_args

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

Source from the content-addressed store, hash-verified

1944 self.assertRaises(EOFError, f.read, 1)
1945
1946 def test_read_bad_args(self):
1947 f = ZstdFile(io.BytesIO(COMPRESSED_DAT))
1948 f.close()
1949 self.assertRaises(ValueError, f.read)
1950 with ZstdFile(io.BytesIO(), "w") as f:
1951 self.assertRaises(ValueError, f.read)
1952 with ZstdFile(io.BytesIO(COMPRESSED_DAT)) as f:
1953 self.assertRaises(TypeError, f.read, float())
1954
1955 def test_read_bad_data(self):
1956 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