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:2483–2499  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

2481
2482@pytest.mark.parquet
2483def test_open_dataset_filesystem_fspath(tempdir):
2484 # single file
2485 table, path = _create_single_file(tempdir)
2486
2487 fspath = FSProtocolClass(path)
2488
2489 # filesystem inferred from path
2490 dataset1 = ds.dataset(fspath)
2491 assert dataset1.schema.equals(table.schema)
2492
2493 # filesystem specified
2494 dataset2 = ds.dataset(fspath, filesystem=fs.LocalFileSystem())
2495 assert dataset2.schema.equals(table.schema)
2496
2497 # passing different filesystem
2498 with pytest.raises(TypeError):
2499 ds.dataset(fspath, filesystem=fs._MockFileSystem())
2500
2501
2502@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