Skip to content

Commit c24ba57

Browse files
Raisa DzhamtyrovaRaisa Dzhamtyrova
Raisa Dzhamtyrova
authored and
Raisa Dzhamtyrova
committed
changes to test_boolean.py and test_replace.py
1 parent 8563db0 commit c24ba57

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

pandas/tests/extension/test_boolean.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _check_op(self, s, op, other, op_name, exc=NotImplementedError):
112112
# subtraction for bools raises TypeError (but not yet in 1.13)
113113
if _np_version_under1p14:
114114
pytest.skip("__sub__ does not yet raise in numpy 1.13")
115-
msg = r"numpy boolean subtract, the \`-\` operator"
115+
msg = r"numpy boolean subtract"
116116
with pytest.raises(TypeError, match=msg):
117117
op(s, other)
118118
return

pandas/tests/frame/methods/test_replace.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,11 +1308,7 @@ def test_categorical_replace_with_dict(self, replace_dict, final_data):
13081308
expected["b"] = expected["b"].cat.set_categories([1, 2, 3])
13091309
result = df.replace(replace_dict, 3)
13101310
tm.assert_frame_equal(result, expected)
1311-
msg = (
1312-
r"Attributes of DataFrame.iloc\[:, 0\] "
1313-
r"\(column name=\"a\"\) are different"
1314-
)
1315-
with pytest.raises(AssertionError, match=msg):
1311+
with pytest.raises(AssertionError):
13161312
# ensure non-inplace call does not affect original
13171313
tm.assert_frame_equal(df, expected)
13181314
df.replace(replace_dict, 3, inplace=True)

0 commit comments

Comments
 (0)