Closed
Description
Derived from #10507. Consider better API for testing functions.
1. How to specify comparison tolerance
Current assert functions have check_less_precise
and check_exact
flags to specify how to compare values:
check_exact=True
: Useassert_equal
, comparison using==
.check_exact=False
andcheck_less_precise=False
: Useassert_almost_equal
, comparing 5 digits after decimal points (default)check_exact=False
andcheck_less_precise=True
: Useassert_almost_equal
, comparing 3 digits after decimal points
There can be single kw to specify above behaviors?
2. Make integrated assert function
I think it's nice to have test functions which supports all pandas
objects for users who is starting contribution / using pandas as their dependencies. Changing assertEquals
and assertAlmostEquals
to internally use current assert_index/series/frame_equal
is one idea.
3. Remove assert_almost_equal
Remove assert_almost_equal
and use class-based validation method. Also add input type validation to numpy_assert_array_equal
.
xref #9895.