Skip to content

Drop pytest warning config in nightly tests #23130

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

Merged
merged 2 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,6 @@ jobs:
run: |
python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple --upgrade numpy pandas

# Turn all warnings to errors, except ignore the distutils deprecations and the find_spec warning
cat >> pytest.ini << EOF
[pytest]
filterwarnings =
error
ignore:.*distutils:DeprecationWarning
ignore:DynamicImporter.find_spec\(\) not found; falling back to find_module\(\):ImportWarning
EOF

- name: Install Matplotlib
run: |
ccache -s
Expand Down
7 changes: 7 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[pytest]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong preference here, but would it make sense to add this to the setup.cfg since we already have that? It seems like a lot of configuration stuff is getting put into that and pyproject.tomls now.

Copy link
Member

@timhoffm timhoffm May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s for now stick with pytest.ini. Long term this should go into pyproject.toml. However creating it only for pytest may be a bit confusing. Setup.cfg is not really recommended for pytest https://docs.pytest.org/en/6.2.x/customize.html#setup-cfg.

# NOTE: Because tests can be run from an installed copy, most of our Pytest
# configuration is in the `pytest_configure` function in
# `lib/matplotlib/testing/conftest.py`. This configuration file exists only to
# prevent Pytest from wasting time trying to check examples and documentation
# files that are not really tests.
testpaths = lib