From 7a710e7978c886c2e5de919501e41e0dcfe3f185 Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <> Date: Fri, 14 Feb 2020 15:37:46 +0200 Subject: [PATCH 1/2] STY: Fixed wrong placement of whitespace --- pandas/tests/arrays/test_integer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/arrays/test_integer.py b/pandas/tests/arrays/test_integer.py index 9186c33c12c06..c2c31dfb3f280 100644 --- a/pandas/tests/arrays/test_integer.py +++ b/pandas/tests/arrays/test_integer.py @@ -349,8 +349,8 @@ def test_error(self, data, all_arithmetic_operators): msg = ( r"(:?can only perform ops with numeric values)" r"|(:?cannot perform .* with this index type: DatetimeArray)" - r"|(:?Addition/subtraction of integers and integer-arrays" - r" with DatetimeArray is no longer supported. *)" + r"|(:?Addition/subtraction of integers and integer-arrays " + r"with DatetimeArray is no longer supported. *)" ) with pytest.raises(TypeError, match=msg): ops(pd.Series(pd.date_range("20180101", periods=len(s)))) From ce17eb50ec2115ecfcb8442d52879cb9055c206d Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <> Date: Fri, 14 Feb 2020 18:01:01 +0200 Subject: [PATCH 2/2] Removed unneccery regex --- pandas/tests/arrays/test_integer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/tests/arrays/test_integer.py b/pandas/tests/arrays/test_integer.py index c2c31dfb3f280..0a5a2362bd290 100644 --- a/pandas/tests/arrays/test_integer.py +++ b/pandas/tests/arrays/test_integer.py @@ -347,10 +347,10 @@ def test_error(self, data, all_arithmetic_operators): # TODO(extension) # rpow with a datetimelike coerces the integer array incorrectly msg = ( - r"(:?can only perform ops with numeric values)" - r"|(:?cannot perform .* with this index type: DatetimeArray)" - r"|(:?Addition/subtraction of integers and integer-arrays " - r"with DatetimeArray is no longer supported. *)" + "can only perform ops with numeric values|" + "cannot perform .* with this index type: DatetimeArray|" + "Addition/subtraction of integers and integer-arrays " + "with DatetimeArray is no longer supported. *" ) with pytest.raises(TypeError, match=msg): ops(pd.Series(pd.date_range("20180101", periods=len(s))))