-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: split up pandas/tests/indexes/test_multi.py #18644
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
Comments
Hi @jreback I would like to work on this issue. I am new to this repo, I think this would be a good issue to solve first. |
@jreback I'm interested in working on this issue. Could you please elaborate what exactly has to be done? Thanks! |
make a sub-dir should have the same number of tests before and after. |
@jreback it looks like @xchoudhury is unresponsive or unable to follow up with this item. Is there an appropriate way to step in and help push the work to completion? Thanks! |
@elmq0022 apologies! I got busy with the end of the school year and the start of my internship. If you want, you may completely take over for me. Thanks again! |
sure - will close this but can take the existing commits and make a new PR |
Thanks @xchoundhury. I've cloned the work you've done so far and will work to incorporate @jreback 's comments from your previous pull request. |
Hey @jreback. From the description this seems like it would be straight forward, but looking more closely at the code, the task is slightly more involved. Unfortunately the calls in test_multi.py inherits from the Base object in common.py which has around 60 tests of it's own. If I was to break up multi.py and inherit from Base each time, I would create a mess where a duplicate set of the tests in Base is run for each new file created. Also, Base is referenced in datetimelike.py, test_base.py, test_category.py, and test_numeric.py besides test_multi.py. So, touching anything in Base class is prohibited. Here's what I propose:
Please let me know if this approach works for you, or please suggestion modifications. Thanks! |
I would suggest moving the things first that don't require the class hierarchy as it may reveal the easiest way to reveal with the remaining ones. Generally fixtures would be preferable. |
Thanks @WillAyd. That would be a very good first pass to see how things shake out. |
I'm making good progress and will probably make a pull request sometime later this week. |
Question: def test_compat(self, indices):
... There when I collect the test suite there are 13 different types of indices generated for the tests like the above. I have been unsuccessful at finding the data or the functions that generate the data for these tests. My current solution is to pull all the new and overridden functions from test_multi.py and convert them to fixtures while leaving a class test suite that's a mashup of Base and TestMulti to handle the methods that are not overridden in test_multi.py which still pulls in the data. This way I still end up with the 377 tests in the original test suite for multi indexes and all tests continue to pass. I am missing something critical here and could use a little push over this speedbump. Thanks! |
That is a fixture that is defined in conftest.py within that package. Here's the location of it: pandas/pandas/tests/indexes/conftest.py Line 25 in 9e982e1
|
Thanks William! I didn't know that conftest.py was a convention in
pytest.
…On Sat, Jun 16, 2018, 5:29 PM William Ayd ***@***.***> wrote:
That is a fixture that is defined in conftest.py within that package.
Here's the location of it:
https://github.com/pandas-dev/pandas/blob/9e982e18678c47c83ce2bb5932f844e2d9ee21f3/pandas/tests/indexes/conftest.py#L25
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18644 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADSn4K6LjGjf4nZM-MygUFmMhHichAU7ks5t9YbbgaJpZM4Q2IeN>
.
|
getting pretty long, could create a sub-dir and split out into separate files.
The text was updated successfully, but these errors were encountered: