-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: Parameterize & make tests more performant #55830
Conversation
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 changes. do you know how much time this saves?
result = pd.read_pickle(handle) | ||
handle.seek(0) # shouldn't close file handle | ||
compare_element(result, expected, typ) | ||
@pytest.mark.parametrize("typ, expected", flatten(create_pickle_data())) |
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.
how big is the memory footprint of create_pickle_data? i think doing this outside the test means it sticks around during the whole collection/runtime
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.
Doing a recursive getsizeof
of the dict yields 426965 bytes so it doesn't seem too much. Additionally IIUC before this data was being yielded from the current_pickle_data
fixture which caches & keeps the data around after first use
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.
lgtm when green
Locally in total for this PR probably a second or so. Another benefit for the tests that reduce the data size is to also to reduce the peak memory pressure of a test. |
No description provided.