(tmpdir)
| 2019 | |
| 2020 | |
| 2021 | def test_input_stream_errors(tmpdir): |
| 2022 | buf = memoryview(b"") |
| 2023 | with pytest.raises(ValueError): |
| 2024 | pa.input_stream(buf, compression="foo") |
| 2025 | |
| 2026 | for arg in [bytearray(), StringIO()]: |
| 2027 | with pytest.raises(TypeError): |
| 2028 | pa.input_stream(arg) |
| 2029 | |
| 2030 | with assert_file_not_found(): |
| 2031 | pa.input_stream("non_existent_file") |
| 2032 | |
| 2033 | with open(str(tmpdir / 'new_file'), 'wb') as f: |
| 2034 | with pytest.raises(TypeError, match="readable file expected"): |
| 2035 | pa.input_stream(f) |
| 2036 | |
| 2037 | |
| 2038 | def test_output_stream_buffer(): |
nothing calls this directly
no test coverage detected