Skip to content

TST: slow pivot_table test #56042

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
Nov 18, 2023
Merged

TST: slow pivot_table test #56042

merged 3 commits into from
Nov 18, 2023

Conversation

lukemanley
Copy link
Member

> pytest pandas/tests/reshape/test_pivot.py::TestPivotTable::test_daily

9.22s  <- main
0.90s  <- PR

@lukemanley lukemanley added Testing pandas testing functions or related to the test suite Performance Memory or execution speed performance labels Nov 18, 2023
@lukemanley lukemanley added this to the 2.2 milestone Nov 18, 2023
@@ -1724,12 +1723,12 @@ def test_daily(self, i):

doy = np.asarray(ts.index.dayofyear)

subset = ts[doy == i]
Copy link
Member

Choose a reason for hiding this comment

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

Honestly, it may be a better test to use tm.assert_frame_equal and compare this to an expected DataFrame (making the input have constant data)

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, that makes sense. updated

@phofl phofl merged commit 50171fc into pandas-dev:main Nov 18, 2023
@phofl
Copy link
Member

phofl commented Nov 18, 2023

thx @lukemanley

@lukemanley lukemanley deleted the slow-test-pivot branch November 22, 2023 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants