diff --git a/doc/source/whatsnew/v1.2.1.rst b/doc/source/whatsnew/v1.2.1.rst index a1612117072a5..b1f8389420cd9 100644 --- a/doc/source/whatsnew/v1.2.1.rst +++ b/doc/source/whatsnew/v1.2.1.rst @@ -10,6 +10,20 @@ including other versions of pandas. .. --------------------------------------------------------------------------- +.. _whatsnew_121.api_breaking: + +Backwards incompatible API changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _whatsnew_121.api_breaking.testing.assert_frame_equal: + +Added ``check_freq`` argument to ``testing.assert_frame_equal`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``check_freq`` argument was added to :func:`testing.assert_frame_equal` in pandas 1.1.0 and defaults to ``True``. :func:`testing.assert_frame_equal` now raises ``AssertionError`` if the indexes do not have the same frequency. Before pandas 1.1.0, the index frequency was not checked by :func:`testing.assert_frame_equal`. + +.. --------------------------------------------------------------------------- + .. _whatsnew_121.regressions: Fixed regressions diff --git a/pandas/_testing/asserters.py b/pandas/_testing/asserters.py index ba4410bd95940..13115d6b959d9 100644 --- a/pandas/_testing/asserters.py +++ b/pandas/_testing/asserters.py @@ -1128,6 +1128,8 @@ def assert_frame_equal( (same as in columns) - same labels must be with the same data. check_freq : bool, default True Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex. + + .. versionadded:: 1.1.0 check_flags : bool, default True Whether to check the `flags` attribute. rtol : float, default 1e-5