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

Function py_fsspec_s3fs

python/pyarrow/tests/test_fs.py:387–406  ·  view source on GitHub ↗
(request, s3_server)

Source from the content-addressed store, hash-verified

385
386@pytest.fixture
387def py_fsspec_s3fs(request, s3_server):
388 s3fs = pytest.importorskip("s3fs")
389 host, port, access_key, secret_key = s3_server['connection']
390 bucket = 'pyarrow-filesystem/'
391
392 fs = s3fs.S3FileSystem(
393 key=access_key,
394 secret=secret_key,
395 client_kwargs=dict(endpoint_url=f'http://{host}:{port}')
396 )
397 fs = PyFileSystem(FSSpecHandler(fs))
398 fs.create_dir(bucket)
399
400 yield dict(
401 fs=fs,
402 pathfn=bucket.__add__,
403 allow_move_dir=False,
404 allow_append_to_file=True,
405 )
406 fs.delete_dir(bucket)
407
408
409@pytest.fixture(params=[

Callers

nothing calls this directly

Calls 4

FSSpecHandlerClass · 0.90
S3FileSystemMethod · 0.80
create_dirMethod · 0.45
delete_dirMethod · 0.45

Tested by

no test coverage detected