(request, s3_server)
| 385 | |
| 386 | @pytest.fixture |
| 387 | def 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=[ |
nothing calls this directly
no test coverage detected