Repository navigation
Closed
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues🌱 Good first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!
Milestone
Description
With the development version of pytest
✘ 17:37:16 $ pip list | grep pytest
pytest 7.2.0.dev320+g196f01965
pytest-benchmark 3.4.1
pytest-cov 4.0.0
pytest-forked 1.4.0
pytest-instafail 0.4.2
pytest-rerunfailures 10.2
pytest-timeout 2.1.0
pytest-tornasync 0.6.0.post2
pytest-xdist 2.5.0
pytest-xvfb 2.0.0
I'm seeing the following errors locally
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_form_main_list - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_form_each_dict - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_form_dict_keys - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_results_baseline - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_results_bootstrapped - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_results_whiskers_float - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_results_whiskers_range - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_results_whiskers_percentiles - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_results_withlabels - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_label_error - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_bad_dims - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_boxplot_stats::test_boxplot_stats_autorange_false - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_callback_complete[True] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_callback_complete[False] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_callback_disconnect[True] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_callback_disconnect[False] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_callback_wrong_disconnect[True] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_callback_wrong_disconnect[False] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_registration_on_non_empty_registry[True] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_registration_on_non_empty_registry[False] - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_cbook.py::Test_callback_registry::test_pickling - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_none - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_mean - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_mean_1d_base_slope_off_list_andor_axis0 - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_mean_2d - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_ValueError - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_mean_ValueError - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_linear - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_str_linear_1d - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
ERROR lib/matplotlib/tests/test_mlab.py::TestDetrend::test_detrend_linear_2d - pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
We are still using nose-stil test classes that we apparently need to migrate away from.
I'm labeling this "good first issue" because you do not need to understand anything about Matplotlib to do this work, but medium difficulty because it involves changing the tests which is a high-risk activity (as you do not have tests on your tests) so this is not a good issue for someone new to Python or testing frameworks.
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues🌱 Good first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!
Activity
elrorvik commentedon Oct 13, 2022
Hi! I'm trying to find the nose-settings in the pytest-config, but I could not find anything about nose-library except in the docs...

Could you point me in the direction of the nose-configs? (From what I could find it was supposed to be in this contest: https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/testing/conftest.py)
tacaswell commentedon Oct 13, 2022
I think the issue is that we are implicitly using nose-style classes that pytest has in the past happily discovered and ran them, but on the current development branch of pytest is starting to warn that this will be removed in the future.
We have our tests set to fail on warning so this is causing test failures for us now (or well as soon as the next version of pytest is released). Hopefully we can get this addressed before then (by fixing it on main and pinning on the bug-fix branch) so we never see these failures on our CI and do not have to deal with this when it becomes a crisis.
oscargus commentedon Oct 14, 2022
I think that only test classes with a setup method count as a Nose test?
For e.g. the
Test_boxplot_statsclassmatplotlib/lib/matplotlib/tests/test_cbook.py
Lines 53 to 176 in f0cd8de
one can either just create the data in every method (now a function) or, the more advanced way, create a pytest fixture with the data.
For
Test_callback_registryit seems to make sense to create a fixture.For
TestDetrendeither create data or fixture. (Some of the tests seems viable for parameterization as well).I guess the thing to closely look for is coverage changes. If there are any, something went wrong. If the coverage it still the same, there is a chance it is correct.
rcomer commentedon Oct 14, 2022
Would it be enough to just replace
setupwithsetup_method?https://docs.pytest.org/en/7.1.x/how-to/xunit_setup.html?highlight=setup_method#method-and-function-level-setup-teardown