-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
TST Add unit tests for _BinaryClassifierCurveDisplayMixin
#31193
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
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.
It looks good @lucyleeow
@jeremiedbb maybe you can have a quick look.
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.
Looks good. Just a couple of comments
sklearn/utils/tests/test_plotting.py
Outdated
if name: | ||
assert name_out == name | ||
else: | ||
assert name_out == display.estimator_name |
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.
maybe cleaner to set the expected value in the parametrization ?
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.
I added it to the name
parametrization (so it is a tuple with input and expected output), this isn't very clean but wasn't sure how to do it as we parametrize over ax
input too.
Let me know what you think / there's a better way to add it to the parametrization.
@jeremiedbb review addressed, gentle ping, thanks! |
@jeremiedbb well that was a brain fart, don't know what I was thinking. Fixed. |
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. Thanks
Reference Issues/PRs
Ref: #30399 (comment)
What does this implement/fix? Explain your changes.
As discussed with @glemaitre the
_BinaryClassifierCurveDisplayMixin
methods/class methods should be tested in isolation, as well as when used inside other classes.This adds unit tests for
_BinaryClassifierCurveDisplayMixin
methods.Any other comments?