From 5871f833431fd05b28d8bf1714b856b6e06372c9 Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Tue, 5 Jul 2022 20:08:23 -0400 Subject: [PATCH] Improve test coverage --- tests/_marks/test_bars.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/_marks/test_bars.py b/tests/_marks/test_bars.py index 4f1c6a97ba..37fdd12d51 100644 --- a/tests/_marks/test_bars.py +++ b/tests/_marks/test_bars.py @@ -92,3 +92,15 @@ def test_mapped_properties(self): assert bar.get_facecolor() == to_rgba(f"C{i}", mark.alpha) assert bar.get_edgecolor() == to_rgba(f"C{i}", 1) assert ax.patches[0].get_linewidth() < ax.patches[1].get_linewidth() + + def test_zero_height_skipped(self): + + p = Plot(["a", "b", "c"], [1, 0, 2]).add(Bar()).plot() + ax = p._figure.axes[0] + assert len(ax.patches) == 2 + + def test_artist_kws_clip(self): + + p = Plot(["a", "b"], [1, 2]).add(Bar({"clip_on": False})).plot() + patch = p._figure.axes[0].patches[0] + assert patch.clipbox is None