Skip to content
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

Fixturize tests/frame/test_api and tests/sparse/frame/test_frame #22738

Merged
merged 2 commits into from
Sep 18, 2018

Conversation

h-vetinari
Copy link
Contributor

@h-vetinari h-vetinari commented Sep 17, 2018

tests/frame/test_api was easy enough to fixturize, but I ran into problems because some tests (notably those in SharedWithSparse) are also used in tests/sparse/frame/test_frame, and there, the corresponding fixtures were not available. Therefore, this PR fixturizes both modules simultaneously, which also necessitates a new conftest.py for the sparse tests.

Some more notes:

  • happy to hear feedback on the sparse fixture names. I haven't worked with SparseDataFrame so far, and couldn't find much documentation for (e.g. default_kind), so the names I chose are best effort
  • I would have loved to replace _check_all with parametrization, but since fixtures can't be parametrized (see Using fixtures in pytest.mark.parametrize pytest-dev/pytest#349), I had to replace it with direct calls.

@pep8speaks
Copy link

Hello @h-vetinari! Thanks for submitting the PR.

@jreback jreback added Testing pandas testing functions or related to the test suite Sparse Sparse Data Type labels Sep 18, 2018
@jreback jreback added this to the 0.24.0 milestone Sep 18, 2018
@jreback
Copy link
Contributor

jreback commented Sep 18, 2018

lgtm @TomAugspurger is this going to completely mess up SparseEA refactor?

@TomAugspurger
Copy link
Contributor

At a glance, it doesn't look like the merge will be too bad. I'd recommend merging this first.

@jreback jreback merged commit 2670494 into pandas-dev:master Sep 18, 2018
@jreback
Copy link
Contributor

jreback commented Sep 18, 2018

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sparse Sparse Data Type Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants