Skip to content

Commit

Permalink
Update tests to call special lines twice to hit removal statements
Browse files Browse the repository at this point in the history
  • Loading branch information
zbruick committed Sep 17, 2019
1 parent 50dc84d commit 69c4267
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metpy/plots/skewt.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ def plot_dry_adiabats(self, t0=None, p=None, **kwargs):
kwargs.setdefault('linestyles', 'dashed')
kwargs.setdefault('alpha', 0.5)
self.dry_adiabats = self.ax.add_collection(LineCollection(linedata, **kwargs))
return self.dry_adiabats

def plot_moist_adiabats(self, t0=None, p=None, **kwargs):
r"""Plot moist adiabats.
Expand Down Expand Up @@ -531,6 +532,7 @@ def plot_moist_adiabats(self, t0=None, p=None, **kwargs):
kwargs.setdefault('linestyles', 'dashed')
kwargs.setdefault('alpha', 0.5)
self.moist_adiabats = self.ax.add_collection(LineCollection(linedata, **kwargs))
return self.moist_adiabats

def plot_mixing_lines(self, w=None, p=None, **kwargs):
r"""Plot lines of constant mixing ratio.
Expand Down Expand Up @@ -583,6 +585,7 @@ def plot_mixing_lines(self, w=None, p=None, **kwargs):
kwargs.setdefault('linestyles', 'dashed')
kwargs.setdefault('alpha', 0.8)
self.mixing_lines = self.ax.add_collection(LineCollection(linedata, **kwargs))
return self.mixing_lines

def shade_area(self, y, x1, x2=0, which='both', **kwargs):
r"""Shade area between two curves.
Expand Down
5 changes: 5 additions & 0 deletions metpy/plots/tests/test_skewt.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def test_skewt_api():
skew.plot_moist_adiabats()
skew.plot_mixing_lines()

# Call again to hit removal statements
skew.plot_dry_adiabats()
skew.plot_moist_adiabats()
skew.plot_mixing_lines()

return fig


Expand Down

0 comments on commit 69c4267

Please sign in to comment.