Skip to content

Commit 41a734f

Browse files
committed
Use pytest.raises
1 parent 31e66fc commit 41a734f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/groupby/test_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,8 @@ def test_quantile_raises():
11191119
df = pd.DataFrame([
11201120
['foo', 'a'], ['foo', 'b'], ['foo', 'c']], columns=['key', 'val'])
11211121

1122-
with tm.assert_raises_regex(TypeError, "cannot be performed against "
1123-
"'object' dtypes"):
1122+
with pytest.raises(TypeError, message="cannot be performed against "
1123+
"'object' dtypes"):
11241124
df.groupby('key').quantile()
11251125

11261126

0 commit comments

Comments
 (0)