Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a92503

Browse filesBrowse files
jklymakMeeseeksDev[bot]
authored andcommitted
Backport PR #12297: Remove some pytest parameterising warnings
1 parent 3d9d656 commit 6a92503
Copy full SHA for 6a92503

File tree

Expand file treeCollapse file tree

4 files changed

+13
-10
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+13
-10
lines changed

‎lib/matplotlib/tests/test_animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_animation.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def test_embed_limit(method_name, caplog, tmpdir):
229229
@pytest.mark.parametrize(
230230
"method_name",
231231
["to_html5_video",
232-
pytest.mark.xfail("to_jshtml")]) # Needs to be fixed.
232+
pytest.param("to_jshtml",
233+
marks=pytest.mark.xfail)])
233234
def test_cleanup_temporaries(method_name, tmpdir):
234235
with tmpdir.as_cwd():
235236
getattr(make_animation(frames=1), method_name)()

‎lib/matplotlib/tests/test_backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_ps.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
@pytest.mark.flaky(reruns=3)
2828
@pytest.mark.parametrize('format, use_log, rcParams', [
2929
('ps', False, {}),
30-
needs_ghostscript(
31-
('ps', False, {'ps.usedistiller': 'ghostscript'})),
32-
needs_usetex(needs_ghostscript(
33-
('ps', False, {'text.usetex': True}))),
30+
pytest.param('ps', False, {'ps.usedistiller': 'ghostscript'},
31+
marks=needs_ghostscript),
32+
pytest.param('ps', False, {'text.usetex': True},
33+
marks=[needs_ghostscript, needs_usetex]),
3434
('eps', False, {}),
3535
('eps', True, {'ps.useafm': True}),
36-
needs_usetex(needs_ghostscript(
37-
('eps', False, {'text.usetex': True}))),
36+
pytest.param('eps', False, {'text.usetex': True},
37+
marks=[needs_ghostscript, needs_usetex]),
3838
], ids=[
3939
'ps',
4040
'ps with distiller',

‎lib/matplotlib/tests/test_backend_svg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_svg.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _test_determinism_save(filename, usetex):
126126
"filename, usetex",
127127
# unique filenames to allow for parallel testing
128128
[("determinism_notex.svg", False),
129-
needs_usetex(("determinism_tex.svg", True))])
129+
pytest.param("determinism_tex.svg", True, marks=needs_usetex)])
130130
def test_determinism(filename, usetex):
131131
import sys
132132
from subprocess import check_output, STDOUT, CalledProcessError

‎lib/matplotlib/tests/test_backends_interactive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backends_interactive.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ def _get_testable_interactive_backends():
3232
reason = "No $DISPLAY"
3333
elif any(importlib.util.find_spec(dep) is None for dep in deps):
3434
reason = "Missing dependency"
35-
backends.append(pytest.mark.skip(reason=reason)(backend) if reason
36-
else backend)
35+
if reason:
36+
backend = pytest.param(
37+
backend, marks=pytest.mark.skip(reason=reason))
38+
backends.append(backend)
3739
return backends
3840

3941

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.