-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG + 1] Prevent nose from using docstring to name the tests in results #4432
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
[MRG + 1] Prevent nose from using docstring to name the tests in results #4432
Conversation
1090810
to
4e633e6
Compare
4e633e6
to
f763a34
Compare
From a cursory look, this looks good to me. It seems to me that you didn't add the "test_describe" decorated, as you suggested in the PR text. I actually prefer avoiding the complexity of the generator, so I prefer it this way, but I think that you should update the PR text. |
Thanks :)
done!
I was also looking for other ways to display the generator name without having to use a decorator! Anyway I was planning the same for a subsequent PR, since this PR already has a huge diff... |
you can always recover a PR by checking out the branch of the PR and doing |
@@ -526,8 +520,6 @@ def test_classification_report_multiclass_with_unicode_label(): | |||
else: | |||
report = classification_report(y_true, y_pred) | |||
assert_equal(report, expected_report) | |||
|
|||
|
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 looks like a mistake?
+1 as well. |
[MRG + 1] Prevent nose from using docstring to name the tests in results
thanks :) |
I did the exact same mistake I did a while ago in the PR that allows sparse y for grid_search... (pushed an empty branch to the PR's branch, which made git assume it got merged and hence closed it in a way it cannot be reopened...) 😭 I actually rebased it wrongly and hence checked out another branch BTW Thanks for the review and merge :) |
I have no idea what github did with the new PRs that can not be reopened... hasn't happened to m, but doesn't sound like fun... |
Yea its definitely not fun :/ Especially since reopening a new PR means the discussion gets split up which is not quite convenient... |
ISSUE
When docstrings are added to
test_*
functions, nose uses them as headers when a particular test fails. This is not very convenient, compared to the function name and the passed arguments (in case of generators).And also as pointed out in the link shared by Joel, test generators do not respect the generators docstring... Most generators use naming similar to
check_*
. Docstrings need not be removed in such cases.Whether the generators need to be decorated by a method which sets its description is debatable.
FIX
@amueller @ogrisel Please take a look