(tmpdir)
| 236 | |
| 237 | |
| 238 | def test_filesystem_uri(tmpdir): |
| 239 | from pyarrow import orc |
| 240 | table = pa.table({"a": [1, 2, 3]}) |
| 241 | |
| 242 | directory = tmpdir / "data_dir" |
| 243 | directory.mkdir() |
| 244 | path = directory / "data.orc" |
| 245 | orc.write_table(table, str(path)) |
| 246 | |
| 247 | # filesystem object |
| 248 | result = orc.read_table(path, filesystem=fs.LocalFileSystem()) |
| 249 | assert result.equals(table) |
| 250 | |
| 251 | # filesystem URI |
| 252 | result = orc.read_table( |
| 253 | "data_dir/data.orc", filesystem=util._filesystem_uri(tmpdir)) |
| 254 | assert result.equals(table) |
| 255 | |
| 256 | # use the path only |
| 257 | result = orc.read_table( |
| 258 | util._filesystem_uri(path)) |
| 259 | assert result.equals(table) |
| 260 | |
| 261 | |
| 262 | def test_orcfile_readwrite(tmpdir): |
nothing calls this directly
no test coverage detected