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

TST: split up test_concat.py #37243 - more follows up #37387

Merged
merged 13 commits into from
Oct 28, 2020

Conversation

kamilt5
Copy link
Contributor

@kamilt5 kamilt5 commented Oct 24, 2020

  • created test_categorical.py

 * created test_categorical.py
 * created test_empty.py

 * changes to test_series.py
@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 24, 2020

I will finish it tomorrow, i didn't have much free time today. There is not much left, i have to create test_sort and test_invalid and make some small changes.

 * created test_categorical.py
 * created test_empty.py

 * changes to test_series.py
 * created test_invalid.py

 * created test_sort.py
 * created test_index.py

 * small changes to test_empty.py, test_datetimes.py, test_dataframe.py
@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 25, 2020

most of the work should be done, all tests are working, it was 291 passed and 1 xfailed before and it's the same now.

@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 25, 2020

I haven't touched test_append_common and test_append, but these files looks ok for me.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

can you show the before / after tests counts (they should match).

make the change in conftest.py and i think this should be able to be green if you merge master.

import pandas._testing as tm


@pytest.fixture(params=[True, False])
Copy link
Contributor

Choose a reason for hiding this comment

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

i would move fixtures to a concat/conftest.py (unless they are truly specific to a particular file)

import pandas._testing as tm


@pytest.fixture(params=[True, False])
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah so this is for sure a common fixture

@jreback jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite labels Oct 26, 2020
@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 26, 2020

Before:
obraz

After:
obraz

Comment on lines 55 to 51
def test_concat_series_axis1(self, sort=sort):
def test_concat_series_axis1(self, sort=True):
ts = tm.makeTimeSeries()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know about this, after moving sort to conftest.py, this test was giving me error, so i have changed default to True. Is this good, or do i have to move fixture to this file and revert this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

pls revert this, you should not be changing any code (literally just removing the fixture definition itself)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, changed.

 * reverted changes to test_series.py
@jreback jreback added this to the 1.2 milestone Oct 26, 2020


def test_concat_timedelta64_block():
from pandas import to_timedelta
Copy link
Contributor

Choose a reason for hiding this comment

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

import at the top

df = DataFrame({"time": rng})

result = concat([df, df])
assert (result.iloc[:10]["time"] == rng).all()
Copy link
Contributor

Choose a reason for hiding this comment

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

ca n you this use tm.assert_frame_equal instead (and use a fully constructed dataframe)

@jreback
Copy link
Contributor

jreback commented Oct 26, 2020

couple of comments, ping on green.

@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 26, 2020

ok, i will check it in a moment.

@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 26, 2020

@jreback everything done

@kamilt5
Copy link
Contributor Author

kamilt5 commented Oct 27, 2020

Can I ask what does "ping on green" mean? Is it the green "review changes" button in "files changed" section? Or is it just typing comment, so you can see new activity?

Copy link
Contributor Author

@kamilt5 kamilt5 left a comment

Choose a reason for hiding this comment

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

green

@jreback jreback merged commit e149880 into pandas-dev:master Oct 28, 2020
@jreback
Copy link
Contributor

jreback commented Oct 28, 2020

thanks @laffite56

kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
ukarroum pushed a commit to ukarroum/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: split up test_concat.py
2 participants