Skip to content

Conversation

@mroeschke
Copy link
Member

Went from 2s to 0.05s locally

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Jun 12, 2023
with tm.assert_produces_warning(FutureWarning, match=msg):
for i in range(1000):
len(algos.unique(lst))
lst = np.array(["A", "B", "C", "D", "E"], dtype=object)
Copy link
Member

Choose a reason for hiding this comment

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

would this still catch the original refcount bug?

im guessing we'd get most of the performance improvement by passing check_stacklevel=False to assert_produces_warning

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 looking back it appears this should have still happened if a numpy array is passed, so I think preemptively changing to address the FutureWarning too is OK

@mroeschke mroeschke added this to the 2.1 milestone Jun 12, 2023
@mroeschke
Copy link
Member Author

Going to merge since we have testing of this FutureWarning elsewhere

@mroeschke mroeschke merged commit 7287eaf into pandas-dev:main Jun 13, 2023
@mroeschke mroeschke deleted the tst/slow branch June 13, 2023 17:25
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing pandas testing functions or related to the test suite

2 participants