MCPcopy Create free account
hub / github.com/apache/arrow / test_open_dataset_filesystem_fspath

Function test_open_dataset_filesystem_fspath

python/pyarrow/tests/test_dataset.py:2478–2494  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

2476
2477@pytest.mark.parquet
2478def test_open_dataset_filesystem_fspath(tempdir):
2479 # single file
2480 table, path = _create_single_file(tempdir)
2481
2482 fspath = FSProtocolClass(path)
2483
2484 # filesystem inferred from path
2485 dataset1 = ds.dataset(fspath)
2486 assert dataset1.schema.equals(table.schema)
2487
2488 # filesystem specified
2489 dataset2 = ds.dataset(fspath, filesystem=fs.LocalFileSystem())
2490 assert dataset2.schema.equals(table.schema)
2491
2492 # passing different filesystem
2493 with pytest.raises(TypeError):
2494 ds.dataset(fspath, filesystem=fs._MockFileSystem())
2495
2496
2497@pytest.mark.parquet

Callers

nothing calls this directly

Calls 4

FSProtocolClassClass · 0.90
_create_single_fileFunction · 0.85
equalsMethod · 0.80
LocalFileSystemMethod · 0.80

Tested by

no test coverage detected