Skip to content

Commit e72bfb2

Browse files
committed
compat for python 3.12
1 parent da6dbc7 commit e72bfb2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/tests/groupby/aggregate/test_numba.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ def correct_function(values, index, a):
4848
expected = data.groupby("key").sum() * 2.7
4949

5050
# py signature binding
51-
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
51+
with pytest.raises(TypeError, match="missing a required (keyword-only argument|argument): 'a'"):
5252
data.groupby("key").agg(incorrect_function, engine="numba", b=1)
5353
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
5454
data.groupby("key").agg(correct_function, engine="numba", b=1)
5555

56-
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
56+
with pytest.raises(TypeError, match="missing a required (keyword-only argument|argument): 'a'"):
5757
data.groupby("key")["data"].agg(incorrect_function, engine="numba", b=1)
5858
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
5959
data.groupby("key")["data"].agg(correct_function, engine="numba", b=1)

pandas/tests/groupby/transform/test_numba.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ def correct_function(values, index, a):
4444
columns=["key", "data"],
4545
)
4646
# py signature binding
47-
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
47+
with pytest.raises(TypeError, match="missing a required (keyword-only argument|argument): 'a'"):
4848
data.groupby("key").transform(incorrect_function, engine="numba", b=1)
4949
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
5050
data.groupby("key").transform(correct_function, engine="numba", b=1)
5151

52-
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
52+
with pytest.raises(TypeError, match="missing a required (keyword-only argument|argument): 'a'"):
5353
data.groupby("key")["data"].transform(incorrect_function, engine="numba", b=1)
5454
with pytest.raises(TypeError, match="missing a required argument: 'a'"):
5555
data.groupby("key")["data"].transform(correct_function, engine="numba", b=1)

0 commit comments

Comments
 (0)