Skip to content

Commit

Permalink
Improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Jul 6, 2022
1 parent 7485415 commit 5871f83
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/_marks/test_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5871f83

Please sign in to comment.