Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0a0873

Browse files
committed
Test right and top too
1 parent 625283f commit c0a0873

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/matplotlib/tests/test_scale.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,15 @@ def test_invalid_log_lims():
133133
with pytest.warns(UserWarning):
134134
ax.set_xlim(left=0)
135135
assert ax.get_xlim() == original_xlim
136+
with pytest.warns(UserWarning):
137+
ax.set_xlim(right=-1)
138+
assert ax.get_xlim() == original_xlim
136139

137140
ax.set_yscale('log')
138141
original_ylim = ax.get_ylim()
139142
with pytest.warns(UserWarning):
140143
ax.set_ylim(bottom=0)
141144
assert ax.get_ylim() == original_ylim
145+
with pytest.warns(UserWarning):
146+
ax.set_ylim(top=-1)
147+
assert ax.get_ylim() == original_ylim

0 commit comments

Comments
 (0)