Skip to content

Commit a7d3cc9

Browse files
simonjayhawkinsgfyoung
authored andcommitted
TST/CLN: remove try/except from test_column_contains_typeerror (#26442)
1 parent 0e9589d commit a7d3cc9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/tests/frame/test_api.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,9 @@ def test_keys(self, float_frame):
111111
getkeys = float_frame.keys
112112
assert getkeys() is float_frame.columns
113113

114-
def test_column_contains_typeerror(self, float_frame):
115-
try:
114+
def test_column_contains_raises(self, float_frame):
115+
with pytest.raises(TypeError, match="unhashable type: 'Index'"):
116116
float_frame.columns in float_frame
117-
except TypeError:
118-
pass
119117

120118
def test_tab_completion(self):
121119
# DataFrame whose columns are identifiers shall have them in __dir__.

0 commit comments

Comments
 (0)