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

Method test_read_exception

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

Source from the content-addressed store, hash-verified

1957 self.assertRaises(ZstdError, f.read)
1958
1959 def test_read_exception(self):
1960 class C:
1961 def read(self, size=-1):
1962 raise OSError
1963 with ZstdFile(C()) as f:
1964 with self.assertRaises(OSError):
1965 f.read(10)
1966
1967 def test_read1(self):
1968 with ZstdFile(io.BytesIO(DAT_130K_C)) as f:

Callers

nothing calls this directly

Calls 4

ZstdFileClass · 0.90
CClass · 0.70
assertRaisesMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected