Skip to content

Commit d8fbd6d

Browse files
author
Niru Maheswaranathan
committed
Rename spine test and add tick test
1 parent c5fbae9 commit d8fbd6d

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

tests/test_utils.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def ax_func(**kwargs):
2020
cu.plotwrapper(ax_func)()
2121

2222

23-
def test_noticks():
23+
def test_nospines():
2424
"""Tests all combinations of removing spines."""
2525

2626
compass = ('left', 'right', 'top', 'bottom')
@@ -37,3 +37,16 @@ def test_noticks():
3737
assert spine.get_visible() == (not kwargs[key])
3838

3939
plt.close(fig)
40+
41+
42+
def test_noticks():
43+
"""Tests that noticks removes both x and y ticks."""
44+
45+
fig, ax = plt.subplots()
46+
ax.plot([1, 2, 3, 4, 5])
47+
cu.noticks(ax=ax)
48+
49+
assert len(ax.get_xticks()) == 0
50+
assert len(ax.get_yticks()) == 0
51+
52+
plt.close(fig)

0 commit comments

Comments
 (0)