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

Function s3fs

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

Source from the content-addressed store, hash-verified

240
241@pytest.fixture
242def s3fs(request, s3_server):
243 request.config.pyarrow.requires('s3')
244 from pyarrow.fs import S3FileSystem
245
246 host, port, access_key, secret_key = s3_server['connection']
247 bucket = 'pyarrow-filesystem/'
248
249 fs = S3FileSystem(
250 access_key=access_key,
251 secret_key=secret_key,
252 endpoint_override=f'{host}:{port}',
253 scheme='http',
254 allow_bucket_creation=True,
255 allow_bucket_deletion=True
256 )
257 fs.create_dir(bucket)
258
259 yield dict(
260 fs=fs,
261 pathfn=bucket.__add__,
262 allow_move_dir=False,
263 allow_append_to_file=False,
264 )
265 fs.delete_dir(bucket)
266
267
268@pytest.fixture

Callers

nothing calls this directly

Calls 4

S3FileSystemClass · 0.85
requiresMethod · 0.80
create_dirMethod · 0.45
delete_dirMethod · 0.45

Tested by

no test coverage detected