(tempdir)
| 275 | |
| 276 | |
| 277 | def test_fspath(tempdir): |
| 278 | # ARROW-12472 support __fspath__ objects without using str() |
| 279 | path = tempdir / "test.parquet" |
| 280 | table = pa.table({"a": [1, 2, 3]}) |
| 281 | _write_table(table, path) |
| 282 | |
| 283 | fs_protocol_obj = util.FSProtocolClass(path) |
| 284 | |
| 285 | result = _read_table(fs_protocol_obj) |
| 286 | assert result.equals(table) |
| 287 | |
| 288 | # combined with non-local filesystem raises |
| 289 | with pytest.raises(TypeError): |
| 290 | _read_table(fs_protocol_obj, filesystem=fs.FileSystem()) |
| 291 | |
| 292 | |
| 293 | @pytest.mark.parametrize("filesystem", [ |
nothing calls this directly
no test coverage detected