diff --git a/pandas/tests/arrays/test_boolean.py b/pandas/tests/arrays/test_boolean.py index cb9b07db4a0df..d14d6f3ff0c41 100644 --- a/pandas/tests/arrays/test_boolean.py +++ b/pandas/tests/arrays/test_boolean.py @@ -131,7 +131,8 @@ def test_to_boolean_array_missing_indicators(a, b): ) def test_to_boolean_array_error(values): # error in converting existing arrays to BooleanArray - with pytest.raises(TypeError): + msg = "Need to pass bool-like value" + with pytest.raises(TypeError, match=msg): pd.array(values, dtype="boolean")