From 9e7951fc3ac182fcfabed4e389c34b2506b37db8 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 1 Sep 2019 15:19:09 -0400 Subject: [PATCH] TST: verify warnings fail the test suite --- lib/matplotlib/tests/test_testing.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/matplotlib/tests/test_testing.py diff --git a/lib/matplotlib/tests/test_testing.py b/lib/matplotlib/tests/test_testing.py new file mode 100644 index 000000000000..55415abb6a04 --- /dev/null +++ b/lib/matplotlib/tests/test_testing.py @@ -0,0 +1,7 @@ +import warnings +import pytest + +@pytest.mark.xfail(strict=True, + reason="testing that warnings fail tests") +def test_warn_to_fail(): + warnings.warn("This should fail the test")