Skip to content

pandas.test() produces many PytestUnknownMarkWarning #32760

Closed
@TomAugspurger

Description

@TomAugspurger

For example

>>> import pandas
>>> pandas.test(['-k', 'TestPDApi'])

Has many warnings like

Envs/dask-dev/lib/python3.7/site-packages/pandas/tests/series/indexing/test_datetime.py:121
  /Users/taugspurger/Envs/dask-dev/lib/python3.7/site-packages/pandas/tests/series/indexing/test_datetime.py:121: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    @pytest.mark.slow

Envs/dask-dev/lib/python3.7/site-packages/pandas/tests/series/methods/test_rank.py:559
  /Users/taugspurger/Envs/dask-dev/lib/python3.7/site-packages/pandas/tests/series/methods/test_rank.py:559: PytestUnknownMarkWarning: Unknown pytest.mark.single - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    @pytest.mark.single

Envs/dask-dev/lib/python3.7/site-packages/pandas/tests/series/methods/test_rank.py:560
  /Users/taugspurger/Envs/dask-dev/lib/python3.7/site-packages/pandas/tests/series/methods/test_rank.py:560: PytestUnknownMarkWarning: Unknown pytest.mark.high_memory - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    @pytest.mark.high_memory

We register these:

pandas/setup.cfg

Lines 56 to 62 in 5da500a

markers =
single: mark a test as single cpu only
slow: mark a test as slow
network: mark a test as network
db: tests requiring a database (mysql or postgres)
high_memory: mark a test as a high-memory only
clipboard: mark a pd.read_clipboard test
. But the setup.cfg is perhaps not included with the distribution, and so the registered marks aren't available perhaps? Is there anyone more familiar with pytest who knows what we should be doing here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildLibrary building on various platformsEnhancementTestingpandas testing functions or related to the test suiteWarningsWarnings that appear or should be added to pandas

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions