We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a33bcc commit b1b6beaCopy full SHA for b1b6bea
lib/matplotlib/tests/test_testing.py
@@ -1,5 +1,8 @@
1
import warnings
2
+
3
import pytest
4
5
+import matplotlib.pyplot as plt
6
from matplotlib.testing.decorators import check_figures_equal
7
8
@@ -22,3 +25,17 @@ def test_wrap_failure():
22
25
@check_figures_equal()
23
26
def should_fail(test, ref):
24
27
pass
28
29
30
+@pytest.mark.xfail(raises=RuntimeError, strict=True,
31
+ reason='Test for check_figures_equal test creating '
32
+ 'new figures')
33
+@check_figures_equal()
34
+def test_check_figures_equal_extra_fig(fig_test, fig_ref):
35
+ plt.figure()
36
37
38
39
+def test_check_figures_equal_closed_fig(fig_test, fig_ref):
40
+ fig = plt.figure()
41
+ plt.close(fig)
0 commit comments