From bd49f7a3b523496806cf1ecd56c9ff2de5b642c5 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Fri, 17 May 2019 21:52:51 +0100 Subject: [PATCH] TST/CLN: remove try/except from test_column_contains_typeerror --- pandas/tests/frame/test_api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandas/tests/frame/test_api.py b/pandas/tests/frame/test_api.py index 8013ddfeb38f9..d1b009a7fa8e2 100644 --- a/pandas/tests/frame/test_api.py +++ b/pandas/tests/frame/test_api.py @@ -111,11 +111,9 @@ def test_keys(self, float_frame): getkeys = float_frame.keys assert getkeys() is float_frame.columns - def test_column_contains_typeerror(self, float_frame): - try: + def test_column_contains_raises(self, float_frame): + with pytest.raises(TypeError, match="unhashable type: 'Index'"): float_frame.columns in float_frame - except TypeError: - pass def test_tab_completion(self): # DataFrame whose columns are identifiers shall have them in __dir__.