Skip to content

Commit 87d9b30

Browse files
committed
Add test_missing_attribute
1 parent f392c60 commit 87d9b30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/frame/test_query_eval.py

+5
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,11 @@ def test_lots_of_operators_string(self, df):
11651165
expect = df[df[" &^ :!€$?(} > <++*'' "] > 4]
11661166
tm.assert_frame_equal(res, expect)
11671167

1168+
def test_missing_attribute(self, df):
1169+
message = "module 'pandas' has no attribute 'thing'"
1170+
with pytest.raises(AttributeError, match=message):
1171+
df.eval("@pd.thing")
1172+
11681173
def test_failing_quote(self, df):
11691174
with pytest.raises(SyntaxError):
11701175
df.query("`it's` > `that's`")

0 commit comments

Comments
 (0)