-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[MRG + 1] Too few arguments in formatting call #9298
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
"match the input. Model n_features is {1} and " | ||
"input n_features is {2} " | ||
"match the input. Model n_features is {0} and " | ||
"input n_features is {1} " |
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.
this means it was not covered by any test. Can you update existing test to catch this pb?
thx
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.
Yes, I'll check in with tests
print('ok') | ||
except: | ||
print("Unexpected error") | ||
raise |
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.
@agramfort Test like this?
use assert_raise_message
…On 13 July 2017 at 22:32, Sebastin Santy ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In sklearn/ensemble/tests/test_bagging.py
<#9298 (comment)>
:
> @@ -448,6 +448,14 @@ def test_parallel_classification():
ensemble.set_params(n_jobs=2)
decisions2 = ensemble.decision_function(X_test)
assert_array_almost_equal(decisions1, decisions2)
+ try:
+ X_err = np.hstack((X_test, np.zeros((X_test.shape[0], 1))))
+ decisionerr = ensemble.decision_function(X_err)
+ except ValueError:
+ print('ok')
+ except:
+ print("Unexpected error")
+ raise
@agramfort <https://github.com/agramfort> Like this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9298 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz65nAtkesjbq6QzvILAOMUzF8l2-bks5sNg5jgaJpZM4ORh_I>
.
|
Thanks @jnothman. Covered with tests now. |
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.
LGTM
thx @SebastinSanty |
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
* Too few arguments in formatting call * Add test * Covered with tests
Reference Issue
Fixes #9280
What does this implement/fix? Explain your changes.
Some placeholders for .format() weren't 0 indexed.