We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3de4a85 commit d74901bCopy full SHA for d74901b
pandas/tests/util/test_assert_produces_warning.py
@@ -12,8 +12,9 @@ def f():
12
13
@pytest.mark.filterwarnings('ignore:f1:FutureWarning')
14
def test_assert_produces_warning_honors_filter():
15
- # raise by default
16
- with pytest.raises(AssertionError):
+ # Raise by default.
+ msg = r"Caused unexpected warning\(s\)"
17
+ with pytest.raises(AssertionError, match=msg):
18
with tm.assert_produces_warning(RuntimeWarning):
19
f()
20
0 commit comments