-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
TST: Fix assert_raises in tests_neural_networks.py #14716
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
Conversation
…ks.py` related to #14216
assert_raises(ValueError, clf(solver='hadoken').fit, X, y) | ||
assert_raises(ValueError, clf(learning_rate='converge').fit, X, y) | ||
assert_raises(ValueError, clf(activation='cloak').fit, X, y) | ||
with pytest.raises(ValueError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test_params_errors
test can be parameterized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as other PR. Let's remove assert_raise_message
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
@rth I am getting the same error here as #14737 (comment). Can you help me resolve the way you did here #14717 (comment) |
@rth I have fixed the error with Let me know if you know how I could do it |
assert_raises
and in tests_neural_networks.py
assert_raises
in tests_neural_networks.py
assert_raises
in tests_neural_networks.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sameshl !
replaced
assert_raises
andassert_raises_regex
withpytest.raises
context manager.related to #14216