Document our pytest fixtures
It'd be nice if all our fixtures had docstrings stating
- What they're useful for
- what they return (possibly parametrized)
- 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
It's quite a bit of missing docs. Two questions arise:
- Where to start?
- Where to stop or how to chunk it?
I think whatever is easiest for you. I would search for a fixture that's relatively simple to describe.
I think doing things one module at a time makes sense.
On Tue, Feb 20, 2018 at 7:54 AM, Ignacio Vergara Kausel < [email protected]> wrote:
It's quite a bit of missing docs. Two questions arise:
- Where to start?
- Where to stop or how to chunk it?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/19159#issuecomment-366984064, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQHInYG9ViJRDo3zNppJ19ao9PizSGeks5tWs6kgaJpZM4RYYPM .
Another question, while diving through the fixtures I've found one fixture (maybe it's not the only one) that is repeated in the same test module. Particularly the tz fixture in tseries/conftest.py and in tseries/offsets/conftest.py.
Is that by design or oversight?
Since the scope of this issue is just to add doctrings to the fixtures I would just repeat it in both fixtures.
Probably an oversight. You could remove the one from offsets/conftest.py and see if things break. I think that pytest's discover should find the one in the parent directory, though I may be wrong.
On Tue, Feb 20, 2018 at 9:13 AM, Ignacio Vergara Kausel < [email protected]> wrote:
Another question, while diving through the fixtures I've found one fixture (maybe it's not the only one) that is repeated in the same test module. Particularly the tz fixture in tseries/conftest.py and in tseries/offsets/conftest.py.
Is that by design or oversight?
Since the scope of this issue is just to add doctrings to the fixtures I would just repeat it in both fixtures.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/19159#issuecomment-367008617, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQHIm_G2Zeo-fyPu7pVRS7kQfj8Oo7yks5tWuEGgaJpZM4RYYPM .
This is not an oversight, more like not implemented. We want to move any duplicate fixtures to a higher level (e.g. to a top-level conftest). IF they are identical that is. Now this may cause issues in that there may be function names that cause this to break. So for now its ok to leave them, but maybe add a TODO: duplicate in the doc-string (so that we know to fix it).
I wrote some docstrings for the tseries set of tests, plus marking where I found the repeated tz fixture throughout the test collection. I'd like to test out the contribution procedure with this small commit as it would be my first one.
Since this contribution doesn't close GH19159 I don't know exactly how to proceed.
@ivergara you can push a PR whenever you're ready. Just link back to this issue so we can track it.
Was there ever a PR opened for this? I'm interested in contributing.
Some work has been done, but there are still more.
You can run pytest --fixtures pandas to see all the fixtures.
pytest --fixtures pandas
=============================================================================== test session starts ================================================================================
platform darwin -- Python 3.6.5, pytest-3.5.1, py-1.5.3, pluggy-0.6.0
rootdir: /Users/taugspurger/sandbox/pandas, inifile: setup.cfg
plugins: xonsh-0.6.2, xdist-1.15.0, rerunfailures-2.2, repeat-0.4.1, cov-2.5.1, annotate-1.0.0, hypothesis-3.44.26
collected 27257 items
cache
Return a cache object that can persist state between testing sessions.
cache.get(key, default)
cache.set(key, value)
Keys must be a ``/`` separated value, where the first part is usually the
name of your plugin or application to avoid clashes with other cache users.
Values can be any object handled by the json stdlib module.
capsys
Enable capturing of writes to ``sys.stdout`` and ``sys.stderr`` and make
captured output available via ``capsys.readouterr()`` method calls
which return a ``(out, err)`` namedtuple. ``out`` and ``err`` will be ``text``
objects.
capsysbinary
Enable capturing of writes to ``sys.stdout`` and ``sys.stderr`` and make
captured output available via ``capsys.readouterr()`` method calls
which return a ``(out, err)`` tuple. ``out`` and ``err`` will be ``bytes``
objects.
capfd
Enable capturing of writes to file descriptors ``1`` and ``2`` and make
captured output available via ``capfd.readouterr()`` method calls
which return a ``(out, err)`` tuple. ``out`` and ``err`` will be ``text``
objects.
capfdbinary
Enable capturing of write to file descriptors 1 and 2 and make
captured output available via ``capfdbinary.readouterr`` method calls
which return a ``(out, err)`` tuple. ``out`` and ``err`` will be
``bytes`` objects.
doctest_namespace
Fixture that returns a :py:class:`dict` that will be injected into the namespace of doctests.
pytestconfig
Session-scoped fixture that returns the :class:`_pytest.config.Config` object.
Example::
def test_foo(pytestconfig):
if pytestconfig.getoption("verbose"):
...
record_property
Add an extra properties the calling test.
User properties become part of the test report and are available to the
configured reporters, like JUnit XML.
The fixture is callable with ``(name, value)``, with value being automatically
xml-encoded.
Example::
def test_function(record_property):
record_property("example_key", 1)
record_xml_property
(Deprecated) use record_property.
record_xml_attribute
Add extra xml attributes to the tag for the calling test.
The fixture is callable with ``(name, value)``, with value being
automatically xml-encoded
caplog
Access and control log capturing.
Captured logs are available through the following methods::
* caplog.text -> string containing formatted log output
* caplog.records -> list of logging.LogRecord instances
* caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string
monkeypatch
The returned ``monkeypatch`` fixture provides these
helper methods to modify objects, dictionaries or os.environ::
monkeypatch.setattr(obj, name, value, raising=True)
monkeypatch.delattr(obj, name, raising=True)
monkeypatch.setitem(mapping, name, value)
monkeypatch.delitem(obj, name, raising=True)
monkeypatch.setenv(name, value, prepend=False)
monkeypatch.delenv(name, value, raising=True)
monkeypatch.syspath_prepend(path)
monkeypatch.chdir(path)
All modifications will be undone after the requesting
test function or fixture has finished. The ``raising``
parameter determines if a KeyError or AttributeError
will be raised if the set/deletion operation has no target.
recwarn
Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.
See http://docs.python.org/library/warnings.html for information
on warning categories.
tmpdir_factory
Return a TempdirFactory instance for the test session.
tmpdir
Return a temporary directory path object
which is unique to each test function invocation,
created as a sub directory of the base temporary
directory. The returned object is a `py.path.local`_
path object.
.. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html
--------------------------------------------------------------------- fixtures defined from pytest_cov.plugin ----------------------------------------------------------------------
cov
A pytest fixture to provide access to the underlying coverage object.
----------------------------------------------------------------------- fixtures defined from pytest_repeat ------------------------------------------------------------------------
------------------------------------------------------------------------ fixtures defined from xdist.plugin ------------------------------------------------------------------------
worker_id
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/xdist/plugin.py:116: no docstring available
---------------------------------------------------------------------- fixtures defined from pandas.conftest -----------------------------------------------------------------------
compression
Fixture for trying common compression types in compression tests
compression_only
Fixture for trying common compression types in compression tests excluding
uncompressed case
datetime_tz_utc
pandas/conftest.py:119: no docstring available
join_type
Fixture for trying all types of join operations
nulls_fixture
Fixture for each null type in pandas
nulls_fixture2
Fixture for each null type in pandas
tz_naive_fixture
Fixture for trying timezones including default (None): [None, 'UTC', 'US/Eastern', 'Asia/Tokyo', 'dateutil/US/Pacific']
tz_aware_fixture
Fixture for trying explicit timezones: ['UTC', 'US/Eastern', 'Asia/Tokyo', 'dateutil/US/Pacific']
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.
observed
pass in the observed keyword to groupby for [True, False]
This indicates whether categoricals should return values for
values which are not in the grouper [False / None], or only values which
appear in the grouper [True]. [None] is supported for future compatiblity
if we decide to change the default (and would need to warn if this
parameter is not passed)
all_arithmetic_operators
Fixture for dunder names for common arithmetic operations
------------------------------------------------------------------ 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.
parser_data
pandas/tests/io/conftest.py:9: no docstring available
--------------------------------------------------------------- fixtures defined from pandas.tests.groupby.conftest ----------------------------------------------------------------
df
pandas/tests/groupby/conftest.py:19: no docstring available
ts
pandas/tests/groupby/conftest.py:28: no docstring available
seriesd
pandas/tests/groupby/conftest.py:33: no docstring available
tsd
pandas/tests/groupby/conftest.py:38: no docstring available
frame
pandas/tests/groupby/conftest.py:43: no docstring available
tsframe
pandas/tests/groupby/conftest.py:48: no docstring available
df_mixed_floats
pandas/tests/groupby/conftest.py:53: no docstring available
three_group
pandas/tests/groupby/conftest.py:64: no docstring available
mframe
pandas/tests/groupby/conftest.py:8: no docstring available
--------------------------------------------------------------- fixtures defined from pandas.tests.indexes.conftest ----------------------------------------------------------------
indices
pandas/tests/indexes/conftest.py:11: no docstring available
one
pandas/tests/indexes/conftest.py:30: no docstring available
zero
pandas/tests/indexes/conftest.py:44: 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.extension.conftest ---------------------------------------------------------------
data
Length-100 array for this type.
data_missing
Length-2 array with [NA, Valid]
all_data
Parametrized fixture giving 'data' and 'data_missing'
data_for_sorting
Length-3 array with a known sort order.
This should be three items [B, C, A] with
A < B < C
data_missing_for_sorting
Length-3 array with a known sort order.
This should be three items [B, NA, A] with
A < B and NA missing.
na_cmp
Binary operator for comparing NA values.
Should return a function of two arguments that returns
True if both arguments are (scalar) NA for your type.
By default, uses ``operator.is_``
na_value
The scalar missing value for this type. Default 'None'
dtype
A fixture providing the ExtensionDtype to validate.
data_for_grouping
Data for factorization, grouping, and unique tests.
Expected to be like [B, B, NA, NA, A, A, B, C]
Where A < B < C and NA is missing
------------------------------------------------------------- fixtures defined from pandas.tests.categorical.conftest --------------------------------------------------------------
ordered
Boolean 'ordered' parameter for Categorical.
allow_fill
Boolean 'allow_fill' parameter for Categorical.take
------------------------------------------------------------------ fixtures defined from pandas.tests.test_window ------------------------------------------------------------------
raw
pandas/tests/test_window.py:34: no docstring available
win_types
pandas/tests/test_window.py:39: no docstring available
win_types_special
pandas/tests/test_window.py:45: no docstring available
----------------------------------------------------------- fixtures defined from pandas.tests.series.indexing.conftest ------------------------------------------------------------
test_data
pandas/tests/series/indexing/conftest.py:7: 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:28: no docstring available
parsed_114
pandas/tests/io/test_stata.py:33: no docstring available
---------------------------------------------------------------- fixtures defined from pandas.tests.io.test_pickle -----------------------------------------------------------------
get_random_path
pandas/tests/io/test_pickle.py:312: no docstring available
current_pickle_data
pandas/tests/io/test_pickle.py:32: 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 ----------------------------------------------------------------
df_full
pandas/tests/io/test_parquet.py:104: no docstring available
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
fp_lt_014
pandas/tests/io/test_parquet.py:75: no docstring available
df_compat
pandas/tests/io/test_parquet.py:84: no docstring available
df_cross_compat
pandas/tests/io/test_parquet.py:89: no docstring available
---------------------------------------------------------------- fixtures defined from pandas.tests.test_downstream ----------------------------------------------------------------
df
pandas/tests/test_downstream.py:35: no docstring available
-------------------------------------------------------------- fixtures defined from pandas.tests.dtypes.test_dtypes ---------------------------------------------------------------
ordered
pandas/tests/dtypes/test_dtypes.py:28: 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.reshape.test_concat --------------------------------------------------------------
sort
Boolean sort keyword for concat and DataFrame.append.
sort_with_none
Boolean sort keyword for concat and DataFrame.append.
Includes the default of None
-------------------------------------------------------------- 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:2282: no docstring available
df_strings
pandas/tests/frame/test_analytics.py:2290: no docstring available
df_main_dtypes
pandas/tests/frame/test_analytics.py:2297: 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:1753: no docstring available
------------------------------------------------------------ fixtures defined from pandas.tests.groupby.test_whitelist -------------------------------------------------------------
df
pandas/tests/groupby/test_whitelist.py:108: no docstring available
df_letters
pandas/tests/groupby/test_whitelist.py:117: no docstring available
raw_frame
pandas/tests/groupby/test_whitelist.py:165: no docstring available
mframe
pandas/tests/groupby/test_whitelist.py:97: 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
author_missing_data
pandas/tests/io/json/test_normalize.py:58: 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.series.test_arithmetic -------------------------------------------------------------
tdser
Return a Series with dtype='timedelta64[ns]', including a NaT.
------------------------------------------------------------ fixtures defined from pandas.tests.sparse.frame.test_apply ------------------------------------------------------------
empty
pandas/tests/sparse/frame/test_apply.py:14: no docstring available
frame
pandas/tests/sparse/frame/test_apply.py:19: no docstring available
fill_frame
pandas/tests/sparse/frame/test_apply.py:29: no docstring available
dates
pandas/tests/sparse/frame/test_apply.py:9: no docstring available
----------------------------------------------------------- fixtures defined from pandas.tests.extension.json.test_json ------------------------------------------------------------
dtype
pandas/tests/extension/json/test_json.py:17: no docstring available
data
Length-100 PeriodArray for semantics test.
data_missing
Length 2 array with [NA, Valid]
data_for_sorting
pandas/tests/extension/json/test_json.py:45: no docstring available
data_missing_for_sorting
pandas/tests/extension/json/test_json.py:50: no docstring available
na_value
pandas/tests/extension/json/test_json.py:55: no docstring available
na_cmp
pandas/tests/extension/json/test_json.py:60: no docstring available
data_for_grouping
pandas/tests/extension/json/test_json.py:65: no docstring available
----------------------------------------------------------- fixtures defined from pandas.tests.internals.test_internals ------------------------------------------------------------
mgr
pandas/tests/internals/test_internals.py:30: 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:1569: no docstring available
right
pandas/tests/reshape/merge/test_merge.py:1579: no docstring available
left_df
pandas/tests/reshape/merge/test_merge.py:1800: no docstring available
right_df
pandas/tests/reshape/merge/test_merge.py:1805: no docstring available
---------------------------------------------------------- fixtures defined from pandas.tests.indexes.datetimes.test_ops -----------------------------------------------------------
tz_fixture
pandas/tests/indexes/datetimes/test_ops.py:18: 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:1532: no docstring available
epoch_1960
pandas/tests/indexes/datetimes/test_tools.py:1537: no docstring available
units_from_epochs
pandas/tests/indexes/datetimes/test_tools.py:1543: no docstring available
epochs
pandas/tests/indexes/datetimes/test_tools.py:1548: no docstring available
julian_dates
pandas/tests/indexes/datetimes/test_tools.py:1556: no docstring available
--------------------------------------------------------- fixtures defined from pandas.tests.extension.test_external_block ---------------------------------------------------------
df
pandas/tests/extension/test_external_block.py:31: no docstring available
--------------------------------------------------------- fixtures defined from pandas.tests.scalar.interval.test_interval ---------------------------------------------------------
interval
pandas/tests/scalar/interval/test_interval.py:12: no docstring available
--------------------------------------------------------- fixtures defined from pandas.tests.series.indexing.test_datetime ---------------------------------------------------------
dups
pandas/tests/series/indexing/test_datetime.py:424: no docstring available
-------------------------------------------------------- fixtures defined from pandas.tests.extension.decimal.test_decimal ---------------------------------------------------------
dtype
pandas/tests/extension/decimal/test_decimal.py:14: no docstring available
data
pandas/tests/extension/decimal/test_decimal.py:19: no docstring available
data_missing
pandas/tests/extension/decimal/test_decimal.py:24: no docstring available
data_for_sorting
pandas/tests/extension/decimal/test_decimal.py:29: no docstring available
data_missing_for_sorting
pandas/tests/extension/decimal/test_decimal.py:36: no docstring available
na_cmp
pandas/tests/extension/decimal/test_decimal.py:43: no docstring available
na_value
pandas/tests/extension/decimal/test_decimal.py:48: no docstring available
data_for_grouping
pandas/tests/extension/decimal/test_decimal.py:53: 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.indexes.period.test_arithmetic ---------------------------------------------------------
not_hourly
Several timedelta-like and DateOffset instances that are _not_
compatible with Hourly frequencies.
not_daily
Several timedelta-like and DateOffset instances that are _not_
compatible with Daily frequencies.
mismatched
Several timedelta-like and DateOffset instances that are _not_
compatible with Monthly or Annual frequencies.
three_days
Several timedelta-like and DateOffset objects that each represent
a 3-day timedelta
two_hours
Several timedelta-like and DateOffset objects that each represent
a 2-hour timedelta
----------------------------------------------------------------- fixtures defined from pandas.tests.io.test_html ------------------------------------------------------------------
set_defaults
pandas/tests/io/test_html.py:82: 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:23: no docstring available
delta
pandas/tests/indexes/datetimes/test_arithmetic.py:30: no docstring available
addend
pandas/tests/indexes/datetimes/test_arithmetic.py:38: no docstring available
------------------------------------------------------ fixtures defined from pandas.tests.indexes.interval.test_construction -------------------------------------------------------
closed
pandas/tests/indexes/interval/test_construction.py:18: no docstring available
name
pandas/tests/indexes/interval/test_construction.py:23: no docstring available
------------------------------------------------------ fixtures defined from pandas.tests.indexes.timedeltas.test_arithmetic -------------------------------------------------------
delta
pandas/tests/indexes/timedeltas/test_arithmetic.py:20: no docstring available
freq
pandas/tests/indexes/timedeltas/test_arithmetic.py:28: no docstring available
----------------------------------------------------------------- fixtures defined from pandas.tests.io.test_excel -----------------------------------------------------------------
set_engine_and_path
Fixture to set engine and open file for use in each test case
Rather than requiring `engine=...` to be provided explicitly as an
argument in each test, this fixture sets a global option to dictate
which engine should be used to write Excel files. After executing
the test it rolls back said change to the global option.
It also uses a context manager to open a temporary excel file for
the function to write to, accessible via `self.path`
Notes
-----
This fixture will run as part of each test method defined in the
class and any subclasses, on account of the `autouse=True`
argument
----------------------------------------------------------------- fixtures defined from pandas.tests.test_resample -----------------------------------------------------------------
------------------------------------------------------ fixtures defined from pandas.tests.extension.category.test_categorical ------------------------------------------------------
dtype
pandas/tests/extension/category/test_categorical.py:16: no docstring available
data
Length-100 PeriodArray for semantics test.
data_missing
Length 2 array with [NA, Valid]
data_for_sorting
pandas/tests/extension/category/test_categorical.py:33: no docstring available
data_missing_for_sorting
pandas/tests/extension/category/test_categorical.py:39: no docstring available
na_value
pandas/tests/extension/category/test_categorical.py:45: no docstring available
data_for_grouping
pandas/tests/extension/category/test_categorical.py:50: no docstring available
------------------------------------------------------ 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
dtype
pandas/tests/indexes/interval/test_interval_tree.py:16: no docstring available
tree
pandas/tests/indexes/interval/test_interval_tree.py:22: no docstring available
----------------------------------------------------- fixtures defined from pandas.tests.indexes.datetimes.test_scalar_compat ------------------------------------------------------
tz
pandas/tests/indexes/datetimes/test_scalar_compat.py:17: 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:594: no docstring available
series
pandas/tests/test_resample.py:606: no docstring available
frame
pandas/tests/test_resample.py:610: no docstring available
series_and_frame
pandas/tests/test_resample.py:614: 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:24: no docstring available
dtype
pandas/tests/reshape/test_reshape.py:30: no docstring available
sparse
pandas/tests/reshape/test_reshape.py:34: no docstring available
--------------------------------------------------------- fixtures defined from pandas.tests.indexes.interval.test_astype ----------------------------------------------------------
index
pandas/tests/indexes/interval/test_astype.py:74: no docstring available
index
pandas/tests/indexes/interval/test_astype.py:118: no docstring available
------------------------------------------------------ fixtures defined from pandas.tests.indexes.interval.test_construction -------------------------------------------------------
constructor
pandas/tests/indexes/interval/test_construction.py:168: no docstring available
constructor
pandas/tests/indexes/interval/test_construction.py:214: no docstring available
constructor
pandas/tests/indexes/interval/test_construction.py:244: no docstring available
--------------------------------------------------------- fixtures defined from pandas.tests.indexes.interval.test_astype ----------------------------------------------------------
index
pandas/tests/indexes/interval/test_astype.py:174: no docstring available
------------------------------------------------------ fixtures defined from pandas.tests.indexes.interval.test_construction -------------------------------------------------------
constructor
pandas/tests/indexes/interval/test_construction.py:353: no docstring available
constructor
pandas/tests/indexes/interval/test_construction.py:291: no docstring available
Ideally all of them would have docstrings, and we would raise an error if someone writes a new one w/o a docstring.
Thanks @TomAugspurger!
@MatthewChatham I did some... but haven't found time to do the whole process. Will try to test a PR this week.
Excellent. I'll try to take a look this week as well and at least make one commit ;)
@MatthewChatham as you can see my contribution got merged, but there is a lot more fixtures that need doctrings.
@ivergara nice work!
Can anyone point what fixture still needs to be fixed, I would like to fix some from the remaining ones.
$ pytest pandas/tests --fixtures
Is there anything I can do to contribute?
I'm going to take a chunk out of some of them...
Hello, is this issue still open? I am a beginner contributor and want to help!
There are still a lot of fixtures that need to be fixed. I am a beginner contributor and would like to help with this. I am starting with the fixtures in pandas.tests.indexes.datetimelike_.test_drop_duplicates.