Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Add docstrings for fixtures defined from pandas.tests.io.conftest #57047

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pandas/tests/io/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

@pytest.fixture
def compression_to_extension():
"""Fixture for compression to extension"""
return {value: key for key, value in icom.extension_to_compression.items()}


Expand All @@ -42,11 +43,13 @@ def salaries_table(datapath):

@pytest.fixture
def feather_file(datapath):
"""Path to a Feather dataset"""
return datapath("io", "data", "feather", "feather-0_3_1.feather")


@pytest.fixture
def xml_file(datapath):
"""Path to a XML dataset"""
return datapath("io", "data", "xml", "books.xml")


Expand Down Expand Up @@ -115,11 +118,13 @@ def s3_base(worker_id, monkeypatch):

@pytest.fixture
def s3so(s3_base):
"""Fixture for the S3 endpoint"""
return {"client_kwargs": {"endpoint_url": s3_base}}


@pytest.fixture
def s3_resource(s3_base):
"""Fixture for the S3 resource"""
import boto3

s3 = boto3.resource("s3", endpoint_url=s3_base)
Expand All @@ -128,6 +133,7 @@ def s3_resource(s3_base):

@pytest.fixture
def s3_public_bucket(s3_resource):
"""Fixture for an empty public S3 bucket"""
bucket = s3_resource.Bucket(f"pandas-test-{uuid.uuid4()}")
bucket.create()
yield bucket
Expand Down Expand Up @@ -165,6 +171,7 @@ def s3_public_bucket_with_data(

@pytest.fixture
def s3_private_bucket(s3_resource):
"""Fixture for an empty private S3 bucket"""
bucket = s3_resource.Bucket(f"cant_get_it-{uuid.uuid4()}")
bucket.create(ACL="private")
yield bucket
Expand Down Expand Up @@ -218,11 +225,13 @@ def s3_private_bucket_with_data(

@pytest.fixture(params=_compression_formats_params[1:])
def compression_format(request):
"""Fixture for the compression format"""
return request.param


@pytest.fixture(params=_compression_formats_params)
def compression_ext(request):
"""Fixture for the compression extension"""
return request.param[0]


Expand Down
Loading