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

BUG: pd.test does not respect passing pandas specific markers #50302

Closed
mroeschke opened this issue Dec 16, 2022 · 5 comments · Fixed by #50330 or #54052
Closed

BUG: pd.test does not respect passing pandas specific markers #50302

mroeschke opened this issue Dec 16, 2022 · 5 comments · Fixed by #50330 or #54052
Labels
Bug Build Library building on various platforms Testing pandas testing functions or related to the test suite

Comments

@mroeschke
Copy link
Member

xref conda-forge/pandas-feedstock#147

When installing pandas and trying to run pd.test(["-m slow"]), -m slow will not necessarily be respected because our custom markers are defined in pyproject.toml

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.9/site-packages/pandas/tests/io/test_html.py:375
../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.9/site-packages/pandas/tests/io/test_html.py:375
  $PREFIX/lib/python3.9/site-packages/pandas/tests/io/test_html.py:375: 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/stable/how-to/mark.html
    @pytest.mark.slow

Since pd.test runs with pytest.main which doesn't have a way to register the custom markers, pd.test is not fully working when running from a package.

@mroeschke mroeschke added Bug Testing pandas testing functions or related to the test suite labels Dec 16, 2022
@lithomas1
Copy link
Member

I don't think we ship pyproject.toml with wheels. Maybe adding to MANIFEST.in will fix it https://github.com/pandas-dev/pandas/blob/main/MANIFEST.in.

@lithomas1 lithomas1 added the Build Library building on various platforms label Dec 16, 2022
@jakirkham
Copy link
Contributor

Yeah was looking in the Conda packages too and didn't see it

@lithomas1
Copy link
Member

lithomas1 commented Dec 16, 2022

If you build from the Github release sdist, than MANIFEST.in is probably the root cause, since the Github release sdist is also uploaded to PyPI IIRC.

@mroeschke
Copy link
Member Author

Yeah since this API is public, I think including pyproject.toml in the wheels would be necessary. Don't think there should be any downsides?

@lithomas1
Copy link
Member

Fix has been reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Library building on various platforms Testing pandas testing functions or related to the test suite
Projects
None yet
3 participants