Skip to content

Document our pytest fixtures #19159

Closed
@TomAugspurger

Description

@TomAugspurger

It'd be nice if all our fixtures had docstrings stating

  1. What they're useful for
  2. what they return (possibly parametrized)
  3. If / when they skip

From pytest --fixtures:

---------------------------------------------------------- fixtures defined from pandas.conftest -----------------------------------------------------------
configure_tests
    pandas/conftest.py:39: no docstring available
add_imports
    pandas/conftest.py:46: no docstring available
spmatrix
    pandas/conftest.py:52: no docstring available
ip
    Get an instance of IPython.InteractiveShell.

    Will raise a skip if IPython is not installed.

------------------------------------------------------ fixtures defined from pandas.tests.io.conftest ------------------------------------------------------
tips_file
    Path to the tips dataset
jsonl_file
    Path a JSONL dataset
salaries_table
    DataFrame with the salaries dataset
s3_resource
    Fixture for mocking S3 interaction.

    The primary bucket name is "pandas-test". The following datasets
    are loaded.

    - tips.csv
    - tips.csv.gz
    - tips.csv.bz2
    - items.jsonl

    A private bucket "cant_get_it" is also created. The boto3 s3 resource
    is yielded by the fixture.

--------------------------------------------------- fixtures defined from pandas.tests.indexes.conftest ----------------------------------------------------
indices
    pandas/tests/indexes/conftest.py:10: no docstring available
one
    pandas/tests/indexes/conftest.py:29: no docstring available

--------------------------------------------------- fixtures defined from pandas.tests.tseries.conftest ----------------------------------------------------
tz
    pandas/tests/tseries/conftest.py:5: no docstring available

----------------------------------------------- fixtures defined from pandas.tests.tseries.offsets.conftest ------------------------------------------------
month_classes
    pandas/tests/tseries/offsets/conftest.py:11: no docstring available
tick_classes
    pandas/tests/tseries/offsets/conftest.py:18: no docstring available
tz
    pandas/tests/tseries/offsets/conftest.py:24: no docstring available
offset_types
    pandas/tests/tseries/offsets/conftest.py:6: no docstring available

----------------------------------------------------- fixtures defined from pandas.tests.io.test_stata -----------------------------------------------------
dirpath
    pandas/tests/io/test_stata.py:27: no docstring available
parsed_114
    pandas/tests/io/test_stata.py:32: no docstring available

---------------------------------------------------- fixtures defined from pandas.tests.io.test_pickle -----------------------------------------------------
get_random_path
    pandas/tests/io/test_pickle.py:313: no docstring available
current_pickle_data
    pandas/tests/io/test_pickle.py:33: no docstring available

---------------------------------------------------- fixtures defined from pandas.tests.frame.test_join ----------------------------------------------------
frame_with_period_index
    pandas/tests/frame/test_join.py:12: no docstring available
frame
    pandas/tests/frame/test_join.py:20: no docstring available
left
    pandas/tests/frame/test_join.py:25: no docstring available
right
    pandas/tests/frame/test_join.py:30: no docstring available

---------------------------------------------------- fixtures defined from pandas.tests.io.test_packers ----------------------------------------------------
current_packers_data
    pandas/tests/io/test_packers.py:47: no docstring available
all_packers_data
    pandas/tests/io/test_packers.py:55: no docstring available

---------------------------------------------------- fixtures defined from pandas.tests.io.test_parquet ----------------------------------------------------
engine
    pandas/tests/io/test_parquet.py:30: no docstring available
pa
    pandas/tests/io/test_parquet.py:43: no docstring available
pa_lt_070
    pandas/tests/io/test_parquet.py:50: no docstring available
pa_ge_070
    pandas/tests/io/test_parquet.py:59: no docstring available
fp
    pandas/tests/io/test_parquet.py:68: no docstring available
df_compat
    pandas/tests/io/test_parquet.py:75: no docstring available
df_cross_compat
    pandas/tests/io/test_parquet.py:80: no docstring available
df_full
    pandas/tests/io/test_parquet.py:95: no docstring available

---------------------------------------------------- fixtures defined from pandas.tests.test_downstream ----------------------------------------------------
df
    pandas/tests/test_downstream.py:33: no docstring available

-------------------------------------------------- fixtures defined from pandas.tests.frame.test_validate --------------------------------------------------
dataframe
    pandas/tests/frame/test_validate.py:8: no docstring available

-------------------------------------------------- fixtures defined from pandas.tests.sparse.test_reshape --------------------------------------------------
multi_index3
    pandas/tests/sparse/test_reshape.py:14: no docstring available
sparse_df
    pandas/tests/sparse/test_reshape.py:9: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.frame.test_analytics --------------------------------------------------
df_duplicates
    pandas/tests/frame/test_analytics.py:2133: no docstring available
df_strings
    pandas/tests/frame/test_analytics.py:2141: no docstring available
df_main_dtypes
    pandas/tests/frame/test_analytics.py:2148: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.scalar.test_interval --------------------------------------------------
interval
    pandas/tests/scalar/test_interval.py:12: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.series.test_validate --------------------------------------------------
series
    pandas/tests/series/test_validate.py:8: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.computation.test_eval -------------------------------------------------
engine
    pandas/tests/computation/test_eval.py:42: no docstring available
parser
    pandas/tests/computation/test_eval.py:55: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.dtypes.test_inference -------------------------------------------------
coerce
    pandas/tests/dtypes/test_inference.py:45: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.frame.test_query_eval -------------------------------------------------
parser
    pandas/tests/frame/test_query_eval.py:31: no docstring available
engine
    pandas/tests/frame/test_query_eval.py:36: no docstring available

------------------------------------------------- fixtures defined from pandas.tests.series.test_analytics -------------------------------------------------
s_main_dtypes
    pandas/tests/series/test_analytics.py:1787: no docstring available

------------------------------------------------ fixtures defined from pandas.tests.groupby.test_whitelist -------------------------------------------------
df
    pandas/tests/groupby/test_whitelist.py:106: no docstring available
df_letters
    pandas/tests/groupby/test_whitelist.py:115: no docstring available
raw_frame
    pandas/tests/groupby/test_whitelist.py:163: no docstring available
mframe
    pandas/tests/groupby/test_whitelist.py:95: no docstring available

------------------------------------------------ fixtures defined from pandas.tests.indexing.test_coercion -------------------------------------------------
check_comprehensiveness
    pandas/tests/indexing/test_coercion.py:18: no docstring available

------------------------------------------------ fixtures defined from pandas.tests.io.json.test_normalize -------------------------------------------------
deep_nested
    pandas/tests/io/json/test_normalize.py:13: no docstring available
state_data
    pandas/tests/io/json/test_normalize.py:42: no docstring available

------------------------------------------------ fixtures defined from pandas.tests.io.json.test_readlines -------------------------------------------------
lines_json_df
    pandas/tests/io/json/test_readlines.py:13: no docstring available

----------------------------------------------- fixtures defined from pandas.tests.internals.test_internals ------------------------------------------------
mgr
    pandas/tests/internals/test_internals.py:32: no docstring available

----------------------------------------------- fixtures defined from pandas.tests.io.formats.test_to_latex ------------------------------------------------
frame
    pandas/tests/io/formats/test_to_latex.py:13: no docstring available

----------------------------------------------- fixtures defined from pandas.tests.reshape.merge.test_merge ------------------------------------------------
left
    pandas/tests/reshape/merge/test_merge.py:1547: no docstring available
right
    pandas/tests/reshape/merge/test_merge.py:1557: no docstring available
left_df
    pandas/tests/reshape/merge/test_merge.py:1760: no docstring available
right_df
    pandas/tests/reshape/merge/test_merge.py:1765: no docstring available

---------------------------------------------- fixtures defined from pandas.tests.io.parser.test_unsupported -----------------------------------------------
python_engine
    pandas/tests/io/parser/test_unsupported.py:23: no docstring available

--------------------------------------------- fixtures defined from pandas.tests.groupby.test_index_as_string ----------------------------------------------
frame
    pandas/tests/groupby/test_index_as_string.py:10: no docstring available
series
    pandas/tests/groupby/test_index_as_string.py:23: no docstring available

--------------------------------------------- fixtures defined from pandas.tests.indexes.datetimes.test_tools ----------------------------------------------
units
    pandas/tests/indexes/datetimes/test_tools.py:1613: no docstring available
epoch_1960
    pandas/tests/indexes/datetimes/test_tools.py:1618: no docstring available
units_from_epochs
    pandas/tests/indexes/datetimes/test_tools.py:1624: no docstring available
epochs
    pandas/tests/indexes/datetimes/test_tools.py:1629: no docstring available
julian_dates
    pandas/tests/indexes/datetimes/test_tools.py:1637: no docstring available

--------------------------------------------- fixtures defined from pandas.tests.internals.test_external_block ---------------------------------------------
df
    pandas/tests/internals/test_external_block.py:31: no docstring available

-------------------------------------------- fixtures defined from pandas.tests.indexes.interval.test_interval ---------------------------------------------
closed
    pandas/tests/indexes/interval/test_interval.py:16: no docstring available
name
    pandas/tests/indexes/interval/test_interval.py:21: no docstring available

------------------------------------------- fixtures defined from pandas.tests.groupby.aggregate.test_aggregate --------------------------------------------
ts
    pandas/tests/groupby/aggregate/test_aggregate.py:19: no docstring available
tsframe
    pandas/tests/groupby/aggregate/test_aggregate.py:24: no docstring available
df
    pandas/tests/groupby/aggregate/test_aggregate.py:29: no docstring available
mframe
    pandas/tests/groupby/aggregate/test_aggregate.py:38: no docstring available
three_group
    pandas/tests/groupby/aggregate/test_aggregate.py:50: no docstring available

------------------------------------------- fixtures defined from pandas.tests.generic.test_label_or_level_utils -------------------------------------------
df
    DataFrame with columns 'L1', 'L2', and 'L3'
df_levels
    DataFrame with columns or index levels 'L1', 'L2', and 'L3'
df_ambig
    DataFrame with levels 'L1' and 'L2' and labels 'L1' and 'L3'
df_duplabels
    DataFrame with level 'L1' and labels 'L2', 'L3', and 'L2'
panel
    pandas/tests/generic/test_label_or_level_utils.py:48: no docstring available

------------------------------------------- fixtures defined from pandas.tests.indexes.datetimes.test_arithmetic -------------------------------------------
tz
    pandas/tests/indexes/datetimes/test_arithmetic.py:18: no docstring available
delta
    pandas/tests/indexes/datetimes/test_arithmetic.py:25: no docstring available
addend
    pandas/tests/indexes/datetimes/test_arithmetic.py:33: no docstring available

------------------------------------------ fixtures defined from pandas.tests.indexes.timedeltas.test_arithmetic -------------------------------------------
delta
    pandas/tests/indexes/timedeltas/test_arithmetic.py:17: no docstring available
freq
    pandas/tests/indexes/timedeltas/test_arithmetic.py:25: no docstring available

----------------------------------------------------- fixtures defined from pandas.tests.test_resample -----------------------------------------------------

------------------------------------------ fixtures defined from pandas.tests.frame.test_sort_values_level_as_str ------------------------------------------
df_none
    pandas/tests/frame/test_sort_values_level_as_str.py:11: no docstring available
df_idx
    pandas/tests/frame/test_sort_values_level_as_str.py:20: no docstring available
sort_names
    pandas/tests/frame/test_sort_values_level_as_str.py:29: no docstring available
ascending
    pandas/tests/frame/test_sort_values_level_as_str.py:43: no docstring available

------------------------------------------ fixtures defined from pandas.tests.indexes.interval.test_interval_tree ------------------------------------------
closed
    pandas/tests/indexes/interval/test_interval_tree.py:11: no docstring available

----------------------------------------- fixtures defined from pandas.tests.indexes.interval.test_interval_range ------------------------------------------
closed
    pandas/tests/indexes/interval/test_interval_range.py:15: no docstring available
name
    pandas/tests/indexes/interval/test_interval_range.py:20: no docstring available

----------------------------------------------------- fixtures defined from pandas.tests.test_resample -----------------------------------------------------
index
    pandas/tests/test_resample.py:724: no docstring available
series
    pandas/tests/test_resample.py:736: no docstring available
frame
    pandas/tests/test_resample.py:740: no docstring available
series_and_frame
    pandas/tests/test_resample.py:744: no docstring available

--------------------------------------- fixtures defined from pandas.tests.reshape.merge.test_merge_index_as_string ----------------------------------------
df1
    pandas/tests/reshape/merge/test_merge_index_as_string.py:10: no docstring available
df2
    pandas/tests/reshape/merge/test_merge_index_as_string.py:18: no docstring available
left_df
    Construct left test DataFrame with specified levels
    (any of 'outer', 'inner', and 'v1')
right_df
    Construct right test DataFrame with specified levels
    (any of 'outer', 'inner', and 'v2')

------------------------------------------------- fixtures defined from pandas.tests.reshape.test_reshape --------------------------------------------------
df
    pandas/tests/reshape/test_reshape.py:23: no docstring available
dtype
    pandas/tests/reshape/test_reshape.py:29: no docstring available
sparse
    pandas/tests/reshape/test_reshape.py:33: no docstring available

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions