Skip to content

Commit 4066a8c

Browse files
committed
Add test_call_non_named_expression
1 parent fe9ce7b commit 4066a8c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pandas/tests/frame/test_query_eval.py

+14
Original file line numberDiff line numberDiff line change
@@ -1176,3 +1176,17 @@ def test_failing_character_outside_range(self, df):
11761176
def test_failing_hashtag(self, df):
11771177
with pytest.raises(SyntaxError):
11781178
df.query("`foo#bar` > 4")
1179+
1180+
def test_call_non_named_expression(self, df):
1181+
def func(*_):
1182+
return 1
1183+
1184+
funcs = [func]
1185+
1186+
df.eval("@func()")
1187+
1188+
with pytest.raises(TypeError):
1189+
df.eval("@funcs[0]()")
1190+
1191+
with pytest.raises(TypeError):
1192+
df.eval("@funcs[0].__call__()")

0 commit comments

Comments
 (0)