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 e6e49aa

Browse filesBrowse files
committed
Added pragma tags for code coverage to ignore unused but untested simplified return.
1 parent 38c092a commit e6e49aa
Copy full SHA for e6e49aa

File tree

1 file changed

+5
-5
lines changed
Filter options

1 file changed

+5
-5
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,7 +2906,7 @@ def test_scatter_different_shapes(self, fig_test, fig_ref):
29062906
@pytest.mark.parametrize('c_case, re_key', params_test_scatter_c)
29072907
def test_scatter_c(self, c_case, re_key):
29082908
def get_next_color():
2909-
return 'blue' # currently unused
2909+
return 'blue' # currently unused # pragma: no cover
29102910

29112911
xsize = 4
29122912
# Additional checking of *c* (introduced in #11383).
@@ -3000,7 +3000,7 @@ def _params(c=None, xsize=2, *, edgecolors=None, **kwargs):
30003000
])
30013001
def test_parse_scatter_color_args(params, expected_result):
30023002
def get_next_color():
3003-
return 'blue' # currently unused
3003+
return 'blue' # currently unused # pragma: no cover
30043004

30053005
c, colors, _edgecolors = mpl.axes.Axes._parse_scatter_color_args(
30063006
*params, get_next_color_func=get_next_color)
@@ -3027,7 +3027,7 @@ def get_next_color():
30273027
])
30283028
def test_parse_scatter_color_args_edgecolors(kwargs, expected_edgecolors):
30293029
def get_next_color():
3030-
return 'blue' # currently unused
3030+
return 'blue' # currently unused # pragma: no cover
30313031

30323032
c = kwargs.pop('c', None)
30333033
edgecolors = kwargs.pop('edgecolors', None)
@@ -3039,7 +3039,7 @@ def get_next_color():
30393039

30403040
def test_parse_scatter_color_args_error():
30413041
def get_next_color():
3042-
return 'blue' # currently unused
3042+
return 'blue' # currently unused # pragma: no cover
30433043

30443044
with pytest.raises(ValueError,
30453045
match="RGBA values should be within 0-1 range"):
@@ -3066,7 +3066,7 @@ def get_next_color():
30663066
def test_parse_c_facecolor_warning_direct(c, facecolor):
30673067
"""Test the internal _parse_scatter_color_args method directly."""
30683068
def get_next_color():
3069-
return 'blue'
3069+
return 'blue' # currently unused # pragma: no cover
30703070

30713071
# Test with facecolors (plural)
30723072
with pytest.warns(UserWarning, match=WARN_MSG):

0 commit comments

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