8000 TST be more specific in test_estimator_checks by adrinjalali · Pull Request #29834 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@adrinjalali
Copy link
Member

This doesn't add or remove any tests. It simply extracts a few tests into their own tests/functions, and uses the specific test instead of calling check_estimator which makes them resistant to changes in test orders and adding tests to check_estimator.

cc @adam2392 @Charlie-XIAO

@adrinjalali adrinjalali added No Changelog Needed Developer API Third party developer API related labels Sep 11, 2024
@github-actions
Copy link
github-actions bot commented Sep 11, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 339fac0. Link to the linter CI: here

Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense. When we only add check_estimator it was potentially great to make sure that we get the right error calling check_estimator. Now that we use the parametrization, this is much better to have atomic tests as in this PR.

Copy link
Member
@adam2392 adam2392 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor
@Charlie-XIAO Charlie-XIAO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I was wondering why for some of the tests name is "test" while for others name is the estimator name? Do we want to be consistent here though it may not really matter?

@adrinjalali
Copy link
Member Author

The name only matters when we check exact values of raised exceptions, otherwise it really doesn't matter.

@adrinjalali adrinjalali enabled auto-merge (squash) September 12, 2024 14:20
@adrinjalali adrinjalali merged commit c24a3f9 into scikit-learn:main Sep 12, 2024
@adrinjalali adrinjalali deleted the tests/test_checks branch September 12, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0