From f56bb35bc6fadaec8e94e05fb3f24c90f7a298f4 Mon Sep 17 00:00:00 2001 From: Diego Argueta Date: Mon, 27 Aug 2018 18:06:35 -0700 Subject: [PATCH 1/3] Fix outdated docstrings in util/testing.py --- pandas/util/testing.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index edd0b0aa82d23..3db251e89842d 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -225,7 +225,7 @@ def assert_almost_equal(left, right, check_dtype="equiv", ---------- left : object right : object - check_dtype : bool / string {'equiv'}, default False + check_dtype : bool / string {'equiv'}, default 'equiv' Check dtype if both a and b are the same type. If 'equiv' is passed in, then `RangeIndex` and `Int64Index` are also considered equivalent when doing type checking. @@ -787,7 +787,7 @@ def assert_index_equal(left, right, exact='equiv', check_names=True, ---------- left : Index right : Index - exact : bool / string {'equiv'}, default False + exact : bool / string {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Int64Index as well. @@ -1034,7 +1034,7 @@ def assert_interval_array_equal(left, right, exact='equiv', Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Int64Index as well. - obj : str, default 'Categorical' + obj : str, default 'IntervalArray' Specify object name being compared, internally used to show appropriate assertion message """ @@ -1326,12 +1326,13 @@ def assert_frame_equal(left, right, check_dtype=True, Second DataFrame to compare. check_dtype : bool, default True Whether to check the DataFrame dtype is identical. - check_index_type : {'equiv'} or bool, default 'equiv' + check_index_type : bool / string {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. - check_column_type : {'equiv'} or bool, default 'equiv' + check_column_type : bool / string {'equiv'}, default 'equiv' Whether to check the columns class, dtype and inferred_type - are identical. + are identical. Is passed as the ``exact`` argument of + :func:`assert_index_equal`. check_frame_type : bool, default True Whether to check the DataFrame class is identical. check_less_precise : bool or int, default False From 99210d168b95cf845a347b79aebf135ac4c73a1e Mon Sep 17 00:00:00 2001 From: Diego Argueta Date: Wed, 19 Sep 2018 17:41:07 -0700 Subject: [PATCH 2/3] Fix escape sequence issue in docstring --- pandas/util/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index 3db251e89842d..c9de2ca46534b 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -2411,7 +2411,7 @@ def wrapper(*args, **kwargs): def assert_raises_regex(_exception, _regexp, _callable=None, *args, **kwargs): - """ + r""" Check that the specified Exception is raised and that the error message matches a given regular expression pattern. This may be a regular expression object or a string containing a regular expression suitable From 4fed465312a548bcb3e53cb6dce6de0b5054be1e Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 20 Sep 2018 16:30:20 +0200 Subject: [PATCH 3/3] Update testing.py --- pandas/util/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index c9de2ca46534b..3db251e89842d 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -2411,7 +2411,7 @@ def wrapper(*args, **kwargs): def assert_raises_regex(_exception, _regexp, _callable=None, *args, **kwargs): - r""" + """ Check that the specified Exception is raised and that the error message matches a given regular expression pattern. This may be a regular expression object or a string containing a regular expression suitable