Skip to content

TST Fixes test so that whole test isn't skipped if pandas not… #16627

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

Merged
merged 3 commits into from
Mar 4, 2020
Merged

TST Fixes test so that whole test isn't skipped if pandas not… #16627

merged 3 commits into from
Mar 4, 2020

Conversation

lrjball
Copy link
Contributor

@lrjball lrjball commented Mar 3, 2020

Reference Issues/PRs

This issue was raised by @thomasjpfan in #14048 and this PR fixes a different test which has the same problem.

What does this implement/fix? Explain your changes.

pytest.importorskip is being used halfway down the test function, so if the import fails the whole test will be skipped. This PR splits the array and dataframe tests into two function, so that the array one can still pass even in pandas is not installed.

As raised by @thomasjpfan in #14048, the remainder of the test will be skipped if pandas is not installed.

This has been fixed in this PR by separating the test into two functions, on for arrays and one for dataframes.
lrjball added 2 commits March 3, 2020 22:56
As raised by @thomasjpfan in #14048, the remainder of the test will be skipped if pandas is not installed.

This has been fixed in this PR by separating the test into two functions, on for arrays and one for dataframes.
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for looking into this @lrjball

LGTM

@thomasjpfan thomasjpfan changed the title Fixed test so that whole test isn't skipped if pandas not installed TST Fixes test so that whole test isn't skipped if pandas not… Mar 4, 2020
@thomasjpfan thomasjpfan merged commit 91d5ac8 into scikit-learn:master Mar 4, 2020
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants