8000 Suppress a warning in the test suite. · matplotlib/matplotlib@13f641c · GitHub
[go: up one dir, main page]

Skip to content

Commit 13f641c

Browse files
committed
Suppress a warning in the test suite.
Namely lib/matplotlib/tests/test_axes.py::test_step_linestyle[png] <venv>/lib/python3.7/site-packages/_pytest/python.py:165: RuntimeWarning: Second argument 'y' is ambiguous: could be a color spec but is in data; using as data. Either rename the entry in data or use three arguments to plot. testfunction(**testargs) <venv>/lib/python3.7/site-packages/_pytest/python.py:165: RuntimeWarning: Second argument 'y1' is ambiguous: could be a color spec but is in data; using as data. Either rename the entry in data or use three arguments to plot. testfunction(**testargs) <venv>/lib/python3.7/site-packages/_pytest/python.py:165: RuntimeWarning: Second argument 'y2' is ambiguous: could be a color spec but is in data; using as data. Either rename the entry in data or use three arguments to plot. testfunction(**testargs)
1 parent 7f4b044 commit 13f641c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,14 +3642,14 @@ def test_step_linestyle():
36423642
ax.set_ylim([-1, 7])
36433643

36443644
# Reuse testcase from above for a labeled data test
3645-
data = {"x": x, "y": y, "y1": y+1, "y2": y+2}
3645+
data = {"X": x, "Y0": y, "Y1": y+1, "Y2": y+2}
36463646
fig, ax_lst = plt.subplots(2, 2)
36473647
ax_lst = ax_lst.flatten()
36483648
ln_styles = ['-', '--', '-.', ':']
36493649
for ax, ls in zip(ax_lst, ln_styles):
3650-
ax.step("x", "y", lw=5, linestyle=ls, where='pre', data=data)
3651-
ax.step("x", "y1", lw=5, linestyle=ls, where='mid', data=data)
3652-
ax.step("x", "y2", lw=5, linestyle=ls, where='post', data=data)
3650+
ax.step("X", "Y0", lw=5, linestyle=ls, where='pre', data=data)
3651+
ax.step("X", "Y1", lw=5, linestyle=ls, where='mid', data=data)
3652+
ax.step("X", "Y2", lw=5, linestyle=ls, where='post', data=data)
36533653
425B ax.set_xlim([-1, 5])
36543654
ax.set_ylim([-1, 7])
36553655

0 commit comments

Comments
 (0)
0