Skip to content

Commit 5871f83

Browse files
committed
Improve test coverage
1 parent 7485415 commit 5871f83

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/_marks/test_bars.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,15 @@ def test_mapped_properties(self):
9292
assert bar.get_facecolor() == to_rgba(f"C{i}", mark.alpha)
9393
assert bar.get_edgecolor() == to_rgba(f"C{i}", 1)
9494
assert ax.patches[0].get_linewidth() < ax.patches[1].get_linewidth()
95+
96+
def test_zero_height_skipped(self):
97+
98+
p = Plot(["a", "b", "c"], [1, 0, 2]).add(Bar()).plot()
99+
ax = p._figure.axes[0]
100+
assert len(ax.patches) == 2
101+
102+
def test_artist_kws_clip(self):
103+
104+
p = Plot(["a", "b"], [1, 2]).add(Bar({"clip_on": False})).plot()
105+
patch = p._figure.axes[0].patches[0]
106+
assert patch.clipbox is None

0 commit comments

Comments
 (0)