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

Function test_filesystem_from_uri_gcs

python/pyarrow/tests/test_fs.py:1748–1764  ·  view source on GitHub ↗
(gcs_server)

Source from the content-addressed store, hash-verified

1746
1747@pytest.mark.gcs
1748def test_filesystem_from_uri_gcs(gcs_server):
1749 from pyarrow.fs import GcsFileSystem
1750
1751 host, port = gcs_server['connection']
1752
1753 uri = ("gs://anonymous@" +
1754 f"mybucket/foo/bar?scheme=http&endpoint_override={host}:{port}&" +
1755 "retry_limit_seconds=5&project_id=test-project-id")
1756
1757 fs, path = FileSystem.from_uri(uri)
1758 assert isinstance(fs, GcsFileSystem)
1759 assert path == "mybucket/foo/bar"
1760
1761 fs.create_dir(path)
1762 [info] = fs.get_file_info([path])
1763 assert info.path == path
1764 assert info.type == FileType.Directory
1765
1766
1767def test_py_filesystem():

Callers

nothing calls this directly

Calls 2

create_dirMethod · 0.45
get_file_infoMethod · 0.45

Tested by

no test coverage detected