Skip to content

Commit c843511

Browse files
author
Maxime Lucas
committed
Test that no error is thrown when calling errorbar with all nan errors
1 parent e88e467 commit c843511

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3981,6 +3981,12 @@ def test_errorbar_nan(fig_test, fig_ref):
39813981
ax.errorbar([4], [3], [6], fmt="C0")
39823982

39833983

3984+
def test_errorbar_allnan_error():
3985+
fig, ax = plt.subplots()
3986+
with pytest.warns(RuntimeWarning, match="All-NaN axis encountered"):
3987+
ax.errorbar([0], [0], [np.nan])
3988+
3989+
39843990
@image_comparison(['hist_stacked_stepfilled', 'hist_stacked_stepfilled'])
39853991
def test_hist_stacked_stepfilled():
39863992
# make some data

0 commit comments

Comments
 (0)