Skip to content

Commit 06507f2

Browse files
committed
TST: add test of LogLocator.subs input validation
1 parent 9d30d56 commit 06507f2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/tests/test_ticker.py

+9
Original file line numberDiff line numberDiff line change
@@ -1260,3 +1260,12 @@ def test_remove_overlap(remove_overlapping_locs, expected_num):
12601260
assert len(ax.xaxis.get_minor_ticks()) == expected_num
12611261
assert len(ax.xaxis.get_minorticklabels()) == expected_num
12621262
assert len(ax.xaxis.get_minorticklines()) == expected_num*2
1263+
1264+
1265+
@pytest.mark.parametrize('sub', [
1266+
['hi', 'aardvark'],
1267+
np.zeros((2, 2))])
1268+
def test_bad_locator_subs(sub):
1269+
ll = mticker.LogLocator()
1270+
with pytest.raises(ValueError):
1271+
ll.subs(sub)

0 commit comments

Comments
 (0)