TST: Fix assert_raises in tests_neural_networks.py#14716
Merged
rth merged 4 commits intoscikit-learn:masterfrom Sep 8, 2019
sameshl:tests_neural_networks
Merged
TST: Fix assert_raises in tests_neural_networks.py#14716rth merged 4 commits intoscikit-learn:masterfrom sameshl:tests_neural_networks
rth merged 4 commits intoscikit-learn:masterfrom
sameshl:tests_neural_networks
Conversation
…ks.py` related to #14216
thomasjpfan
reviewed
Aug 22, 2019
| 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): |
Member
There was a problem hiding this comment.
The test_params_errors test can be parameterized.
glemaitre
requested changes
Aug 23, 2019
Member
glemaitre
left a comment
There was a problem hiding this comment.
Same as other PR. Let's remove assert_raise_message as well.
Contributor
Author
|
@rth I am getting the same error here as #14737 (comment). Can you help me resolve the way you did here #14717 (comment) |
Contributor
Author
|
@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.pyassert_raises in tests_neural_networks.py
assert_raises in tests_neural_networks.py
rth
approved these changes
Sep 8, 2019
43 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
replaced
assert_raisesandassert_raises_regexwithpytest.raisescontext manager.related to #14216