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 360d83d

Browse filesBrowse files
jklymakArchangeGabriel
authored andcommitted
Backport PR #12297: Remove some pytest parameterising warnings
1 parent a818a05 commit 360d83d
Copy full SHA for 360d83d

File tree

Expand file treeCollapse file tree

3 files changed

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

3 files changed

+13
-8
lines changed

‎lib/matplotlib/tests/test_backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_ps.py
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@
3131
@pytest.mark.flaky(reruns=3)
3232
@pytest.mark.parametrize('format, use_log, rcParams', [
3333
('ps', False, {}),
34-
needs_ghostscript(('ps', False, {'ps.usedistiller': 'ghostscript'})),
35-
needs_usetex(needs_ghostscript(('ps', False, {'text.latex.unicode': True,
36-
'text.usetex': True}))),
34+
pytest.param('ps', False, {'ps.usedistiller': 'ghostscript'},
35+
marks=needs_ghostscript),
36+
pytest.param('ps', False, {'text.latex.unicode': True,
37+
'text.usetex': True},
38+
marks=[needs_ghostscript, needs_usetex]),
3739
('eps', False, {}),
3840
('eps', True, {'ps.useafm': True}),
39-
needs_usetex(needs_ghostscript(('eps', False, {'text.latex.unicode': True,
40-
'text.usetex': True}))),
41+
pytest.param('eps', False, {'text.latex.unicode': True,
42+
'text.usetex': True},
43+
marks=[needs_ghostscript, needs_usetex]),
4144
], ids=[
4245
'ps',
4346
'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
@@ -130,7 +130,7 @@ def _test_determinism_save(filename, usetex):
130130
"filename, usetex",
131131
# unique filenames to allow for parallel testing
132132
[("determinism_notex.svg", False),
133-
needs_usetex(("determinism_tex.svg", True))])
133+
pytest.param("determinism_tex.svg", True, marks=needs_usetex)])
134134
def test_determinism(filename, usetex):
135135
import sys
136136
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
@@ -31,8 +31,10 @@ def _get_testable_interactive_backends():
3131
reason = "No $DISPLAY"
3232
elif any(importlib.util.find_spec(dep) is None for dep in deps):
3333
reason = "Missing dependency"
34-
backends.append(pytest.mark.skip(reason=reason)(backend) if reason
35-
else backend)
34+
if reason:
35+
backend = pytest.param(
36+
backend, marks=pytest.mark.skip(reason=reason))
37+
backends.append(backend)
3638
return backends
3739

3840

0 commit comments

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