Skip to content

Commit f22fba6

Browse files
author
MomIsBestFriend
committed
Removed tests for external error messages
1 parent 94be866 commit f22fba6

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

pandas/tests/internals/test_internals.py

+3-14
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,7 @@ def test_delete(self):
298298

299299
newb = self.fblock.copy()
300300

301-
msg = "index 3 is out of bounds for axis 0 with size 3"
302-
303-
with pytest.raises(IndexError, match=msg):
301+
with pytest.raises(IndexError, match=None):
304302
newb.delete(3)
305303

306304

@@ -325,11 +323,7 @@ def test_can_hold_element(self):
325323
val = date(2010, 10, 10)
326324
assert not block._can_hold_element(val)
327325

328-
msg = (
329-
"'value' should be a 'Timestamp', 'NaT', "
330-
"or array of those. Got 'date' instead."
331-
)
332-
with pytest.raises(TypeError, match=msg):
326+
with pytest.raises(TypeError, match=None):
333327
arr[0] = val
334328

335329

@@ -818,13 +812,8 @@ def test_validate_bool_args(self):
818812
invalid_values = [1, "True", [1, 2, 3], 5.0]
819813
bm1 = create_mgr("a,b,c: i8-1; d,e,f: i8-2")
820814

821-
msg = (
822-
'For argument "inplace" expected type bool, '
823-
"received type (int|str|list|float)."
824-
)
825-
826815
for value in invalid_values:
827-
with pytest.raises(ValueError, match=msg):
816+
with pytest.raises(ValueError, match=None):
828817
bm1.replace_list([1], [2], inplace=value)
829818

830819

0 commit comments

Comments
 (0)