(tempdir, filesystem, name)
| 312 | ]) |
| 313 | @pytest.mark.parametrize("name", ("data.parquet", "例.parquet")) |
| 314 | def test_relative_paths(tempdir, filesystem, name): |
| 315 | # reading and writing from relative paths |
| 316 | table = pa.table({"a": [1, 2, 3]}) |
| 317 | path = tempdir / name |
| 318 | |
| 319 | # reading |
| 320 | pq.write_table(table, str(path)) |
| 321 | with util.change_cwd(tempdir): |
| 322 | result = pq.read_table(name, filesystem=filesystem) |
| 323 | assert result.equals(table) |
| 324 | |
| 325 | path.unlink() |
| 326 | assert not path.exists() |
| 327 | |
| 328 | # writing |
| 329 | with util.change_cwd(tempdir): |
| 330 | pq.write_table(table, name, filesystem=filesystem) |
| 331 | result = pq.read_table(path) |
| 332 | assert result.equals(table) |
| 333 | |
| 334 | |
| 335 | def test_read_non_existing_file(): |
nothing calls this directly
no test coverage detected