8000 improve test coverage by testing for ValueError · matplotlib/matplotlib@a5aa349 · GitHub
[go: up one dir, main page]

Skip to content

Commit a5aa349

Browse files
committed
improve test coverage by testing for ValueError
1 parent a2584af commit a5aa349

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4123,6 +4123,10 @@ def test_axline_args():
41234123
ax.set_yscale('log')
41244124
with pytest.raises(TypeError):
41254125
ax.axline((0, 0), slope=1)
4126+
ax.set_yscale('linear')
4127+
with pytest.raises(ValueError):
4128+
ax.axline((0, 0), (0, 0)) # two identical points are not allowed
4129+
plt.draw()
41264130

41274131

41284132
@image_comparison(['vlines_basic', 'vlines_with_nan', 'vlines_masked'],

0 commit comments

Comments
 (0)
0