Skip to content

Commit 7877939

Browse files
committed
TST: Use new method for applying pytest markers.
1 parent 4386421 commit 7877939

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ def _mark_xfail_if_format_is_uncomparable(extension):
170170
if will_fail:
171171
fail_msg = 'Cannot compare %s files on this system' % extension
172172
import pytest
173-
return pytest.mark.xfail(extension, reason=fail_msg, strict=False,
173+
mark = pytest.mark.xfail(reason=fail_msg, strict=False,
174174
raises=ImageComparisonFailure)
175+
return pytest.param(extension, marks=mark)
175176
else:
176177
return extension
177178

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ def test_lines3d():
133133

134134

135135
# Reason for flakiness of SVG test is still unknown.
136-
@image_comparison(baseline_images=['mixedsubplot'], remove_text=True,
137-
extensions=['png', 'pdf',
138-
pytest.mark.xfail('svg', strict=False)])
136+
@image_comparison(
137+
baseline_images=['mixedsubplot'], remove_text=True,
138+
extensions=['png', 'pdf',
139+
pytest.param('svg', marks=pytest.mark.xfail(strict=False))])
139140
def test_mixedsubplots():
140141
def f(t):
141142
s1 = np.cos(2*np.pi*t)

0 commit comments

Comments
 (0)