Skip to content

ENH: Bring assert_equals into the public API #45964

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

Open
rhshadrach opened this issue Feb 12, 2022 · 0 comments
Open

ENH: Bring assert_equals into the public API #45964

rhshadrach opened this issue Feb 12, 2022 · 0 comments
Labels
Enhancement Needs Discussion Requires discussion from core team before further action Testing pandas testing functions or related to the test suite

Comments

@rhshadrach
Copy link
Member

rhshadrach commented Feb 12, 2022

assert_equal was added in #22033 after other testing methods were exposed in the public API in #16003, and I haven't been able to find any discussion on whether this should be added. I recently ran into a case where it could have been useful.

If we are to go this route, then I think two enhancements should be made first:

  • Improve the docstring
  • Raise if the objects passed are not pandas objects (Series, DataFrame, EA, Index, etc).

For the 2nd, the current implementation has a specific check for strings and a fallthrough for all other objects. These two cases are hit by 9 tests that would need to be changed.

@rhshadrach rhshadrach added Enhancement Testing pandas testing functions or related to the test suite Needs Discussion Requires discussion from core team before further action labels Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Discussion Requires discussion from core team before further action Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

1 participant