Skip to content

Commit

Permalink
DOC: Fixtures docs in io/parser/conftest.py (#30775)
Browse files Browse the repository at this point in the history
Partially addresses:

#19159
  • Loading branch information
gfyoung authored and TomAugspurger committed Jan 7, 2020
1 parent b5da1ae commit 8b39347
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pandas/tests/io/parser/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ class PythonParser(BaseParser):

@pytest.fixture
def csv_dir_path(datapath):
"""
The directory path to the data files needed for parser tests.
"""
return datapath("io", "parser", "data")


@pytest.fixture
def csv1(csv_dir_path):
"""
The path to the data file "test1.csv" needed for parser tests.
"""
return os.path.join(csv_dir_path, "test1.csv")


Expand All @@ -69,14 +75,23 @@ def csv1(csv_dir_path):

@pytest.fixture(params=_all_parsers, ids=_all_parser_ids)
def all_parsers(request):
"""
Fixture all of the CSV parsers.
"""
return request.param


@pytest.fixture(params=_c_parsers_only, ids=_c_parser_ids)
def c_parser_only(request):
"""
Fixture all of the CSV parsers using the C engine.
"""
return request.param


@pytest.fixture(params=_py_parsers_only, ids=_py_parser_ids)
def python_parser_only(request):
"""
Fixture all of the CSV parsers using the Python engine.
"""
return request.param

0 comments on commit 8b39347

Please sign in to comment.