-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MNT refactor tests for datasets #17599
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
MNT refactor tests for datasets #17599
Conversation
This is coming in support of PR implementing support for |
ping @thomasjpfan @rth @adrinjalali Since you were involved in those. |
@amueller was also involved :) |
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
) | ||
def test_common_check_as_frame(name, dataset_func): | ||
bunch = dataset_func() | ||
check_as_frame(bunch, partial(dataset_func)) |
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 am curious, what is the use of partial
here ?
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.
Right it does not seem to be useful. I'll remove it
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.
Nice!
|
||
|
||
def _has_network(): | ||
return bool(os.environ.get("SKLEARN_SKIP_NETWORK_TESTS", False)) |
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.
related: #17553 by @thomasjpfan
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'm not sure if you wanna merge as is or take that PR into account.
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.
Ideally, I would have like to merge it quickly to avoid redundant tests in the fetch_*
PRs that are coming. I also want the PR of @thomasjpfan to get in because this is really useful but I think that the fix will be easy to handle even once merged.
* MNT refactor tests for datasets * PEP8 * remove partial
* MNT refactor tests for datasets * PEP8 * remove partial
* MNT refactor tests for datasets * PEP8 * remove partial
refactor tests for the datasets module to:
load_*
functionsas_frame
andreturn_X_y
support.