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 Changes assert to pytest style in tests/test_naive_bayes.py #19768

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 12 commits into from
Apr 1, 2021

Conversation

azihna
Copy link
Contributor

@azihna azihna commented Mar 26, 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_naive_bayes.py to pytest.raises().
Added additional message checks for tests that seemed like could benefit from further clarification.

Copy link
Contributor

@cmarmo cmarmo left a comment

Choose a reason for hiding this comment

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

Thanks @azihna , just a not blocking comment... :)
Also, let me cite #19414 just to have this pull request linked there.

sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
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.

Thanks for the PR @azihna !

sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
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

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @azihna !

Most comments are related to using re.escape when it is needed.

sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Show resolved Hide resolved
sklearn/tests/test_naive_bayes.py Outdated Show resolved Hide resolved
azihna and others added 8 commits April 1, 2021 15:02
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
@azihna azihna requested a review from thomasjpfan April 1, 2021 14:07
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan changed the title TST Change assert from sklearn to pytest style in tests/test_naive_bayes.py TST Changes assert to pytest style in tests/test_naive_bayes.py Apr 1, 2021
@thomasjpfan thomasjpfan merged commit 108dd7b into scikit-learn:main Apr 1, 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.

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