(tmpdir)
| 2052 | |
| 2053 | |
| 2054 | def test_input_stream_errors(tmpdir): |
| 2055 | buf = memoryview(b"") |
| 2056 | with pytest.raises(ValueError): |
| 2057 | pa.input_stream(buf, compression="foo") |
| 2058 | |
| 2059 | for arg in [bytearray(), StringIO()]: |
| 2060 | with pytest.raises(TypeError): |
| 2061 | pa.input_stream(arg) |
| 2062 | |
| 2063 | with assert_file_not_found(): |
| 2064 | pa.input_stream("non_existent_file") |
| 2065 | |
| 2066 | with open(str(tmpdir / 'new_file'), 'wb') as f: |
| 2067 | with pytest.raises(TypeError, match="readable file expected"): |
| 2068 | pa.input_stream(f) |
| 2069 | |
| 2070 | |
| 2071 | def test_output_stream_buffer(): |
nothing calls this directly
no test coverage detected