Skip to content

TST Replaces pytest.warns in /cluster, /cross_decomposition, /decomposition, and /ensemble folders #22821

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

Closed
wants to merge 8 commits into from

Conversation

ShanDeng123
Copy link
Contributor

@ShanDeng123 ShanDeng123 commented Mar 13, 2022

Reference Issues/PRs
References #22572.

What does this implement/fix? Explain your changes.
Replaces the depreciating function pytest.warns(None) with warnings.catch_warnings(record=True).

Files Updated:

  • test_feature_agglomeration.py
  • test_optics.py
  • sklearn/cross_decomposition/tests/test_pls.py
  • sklearn/decomposition/tests/test_dict_learning.py
  • sklearn/decomposition/tests/test_fastica.py
  • sklearn/decomposition/tests/test_kernel_pca.py
  • sklearn/decomposition/tests/test_pca.py
  • sklearn/ensemble/tests/test_iforest.py
  • sklearn/ensemble/tests/test_voting.py

Any other comments?

  • Received 6 warnings when running Pytest on test_dict_learning.py
  • Received 28 warnings when running Pytest on test_kernel_pca.py
  • Received 17 warnings when running Pytest on test_voting.py

Unsure if these warnings are related to my updates or were preexisting...

@ShanDeng123 ShanDeng123 changed the title TST Replaces pytest.warns in cluster/tests folder TST Replaces pytest.warns in /cluster, /cross_decomposition, /decomposition, and /ensemble folders Mar 13, 2022
@ShanDeng123 ShanDeng123 deleted the pytest_updates branch March 14, 2022 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants