-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Make old tests more performant #55746
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
Conversation
mroeschke
commented
Oct 28, 2023
•
edited
Loading
edited
- Use less data to test the same behavior
- Parameterize test for loops
@pytest.mark.slow | ||
@pytest.mark.parametrize("df, keys, bins, n, m", binned, ids=ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
expected = DataFrame({"x": range(10**6 + 1)}, dtype="int64") | ||
size_cutoff = 50 | ||
with monkeypatch.context(): | ||
monkeypatch.setattr(libindex, "_SIZE_CUTOFF", size_cutoff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm looking at this id actually expect us to cdef _SIZE_CUTOFF
for a tiny perf boost. no harm in doing this until then i guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as there's an accessible Python version to override this too, SGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think they're mutually exclusive, but im fine with doing this for the short-to-medium term
Looks like tests are passing here so going to merge |