MCPcopy Create free account
hub / github.com/apache/arrow / BogusFile

Class BogusFile

python/pyarrow/tests/parquet/test_basic.py:342–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340
341def test_file_error_python_exception():
342 class BogusFile(io.BytesIO):
343 def read(self, *args):
344 raise ZeroDivisionError("zorglub")
345
346 def seek(self, *args):
347 raise ZeroDivisionError("zorglub")
348
349 # ensure the Python exception is restored
350 with pytest.raises(ZeroDivisionError, match="zorglub"):

Callers 1

Calls

no outgoing calls

Tested by 1