Skip to content

Commit

Permalink
Merge pull request #4 from yashsaboo/fix_flaky
Browse files Browse the repository at this point in the history
Fixed test_plot_transposed_nondim_coord() and class TestDiscreteColorMap's polluter tests
  • Loading branch information
yashsaboo authored Nov 25, 2020
2 parents f1e2f9d + abbe7af commit 3660595
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions xarray/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,9 @@ def setUp(self):
self.darray = DataArray(distance, list(zip(("y", "x"), (y, x))))
self.data_min = distance.min()
self.data_max = distance.max()
yield
# Remove all matplotlib figures
plt.close("all")

@pytest.mark.slow
def test_recover_from_seaborn_jet_exception(self):
Expand Down Expand Up @@ -2428,8 +2431,10 @@ def test_plot_transposed_nondim_coord(plotfunc):
dims=["s", "x"],
coords={"x": x, "s": s, "z": (("s", "x"), z), "zt": (("x", "s"), z.T)},
)
getattr(da.plot, plotfunc)(x="x", y="zt")
getattr(da.plot, plotfunc)(x="zt", y="x")
with figure_context():
getattr(da.plot, plotfunc)(x="x", y="zt")
with figure_context():
getattr(da.plot, plotfunc)(x="zt", y="x")


@requires_matplotlib
Expand Down

0 comments on commit 3660595

Please sign in to comment.