(request, s3_server)
| 240 | |
| 241 | @pytest.fixture |
| 242 | def 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 |
nothing calls this directly
no test coverage detected