Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TST Change assert from sklearn to pytest style in tests/test_multiclass.py #19593

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 10 commits into from
Mar 3, 2021

Conversation

azihna
Copy link
Contributor

@azihna azihna commented Mar 1, 2021

Reference Issues/PRs

References #14216

What does this implement/fix? Explain your changes.

Changed the assert_raises, assert_message, assert_warns in tests/test_multiclass.py to pytest.raises() and pytest.warns().
Added additional message checks for tests that seemed like could benefit from further clarification.
Fixed several unrelated flake8 errors such as in test test_ovr_single_label_predict_proba.
In several cases, changed ValueError to NotFittedError since that seemed more appropriate.

Any other comments?

#DataUmbrella

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Some comments:

sklearn/tests/test_multiclass.py Outdated Show resolved Hide resolved
sklearn/tests/test_multiclass.py Outdated Show resolved Hide resolved
sklearn/tests/test_multiclass.py Outdated Show resolved Hide resolved
sklearn/tests/test_multiclass.py Outdated Show resolved Hide resolved
sklearn/tests/test_multiclass.py Outdated Show resolved Hide resolved
sklearn/tests/test_multiclass.py Outdated Show resolved Hide resolved
azihna and others added 6 commits March 2, 2021 11:22
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR!

@azihna
Copy link
Contributor Author

azihna commented Mar 3, 2021

Thanks for the reviews and your help @ogrisel

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @azihna !

@jeremiedbb jeremiedbb merged commit bd53f54 into scikit-learn:main Mar 3, 2021
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.