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

Source from the content-addressed store, hash-verified

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