Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e7951f

Browse files
committed
TST: verify warnings fail the test suite
1 parent b3fadcb commit 9e7951f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_testing.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import warnings
2+
import pytest
3+
4+
@pytest.mark.xfail(strict=True,
5+
reason="testing that warnings fail tests")
6+
def test_warn_to_fail():
7+
warnings.warn("This should fail the test")

0 commit comments

Comments
 (0)