Skip to content

ENH: Bring assert_equals into the public API #45964

Open
@rhshadrach

Description

@rhshadrach

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds DiscussionRequires discussion from core team before further actionTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions