Skip to content

Commit

Permalink
Add test for #9155 (#9161)
Browse files Browse the repository at this point in the history
* Add test for #9155

I can't get this to fail locally, so adding a test to assess what's going on.

Alos excludes matplotlib from type exclusions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
max-sixty and pre-commit-ci[bot] authored Jun 24, 2024
1 parent c8ff731 commit 872c1c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ module = [
"h5netcdf.*",
"h5py.*",
"iris.*",
"matplotlib.*",
"mpl_toolkits.*",
"nc_time_axis.*",
"netCDF4.*",
Expand Down
10 changes: 10 additions & 0 deletions xarray/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3406,3 +3406,13 @@ def test_plot1d_filtered_nulls() -> None:
actual = pc.get_offsets().shape[0]

assert expected == actual


@requires_matplotlib
def test_9155() -> None:
# A test for types from issue #9155

with figure_context():
data = xr.DataArray([1, 2, 3], dims=["x"])
fig, ax = plt.subplots(ncols=1, nrows=1)
data.plot(ax=ax)

0 comments on commit 872c1c5

Please sign in to comment.