Skip to content

Commit 872c1c5

Browse files
Add test for #9155 (#9161)
* 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>
1 parent c8ff731 commit 872c1c5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ module = [
114114
"h5netcdf.*",
115115
"h5py.*",
116116
"iris.*",
117-
"matplotlib.*",
118117
"mpl_toolkits.*",
119118
"nc_time_axis.*",
120119
"netCDF4.*",

xarray/tests/test_plot.py

+10
Original file line numberDiff line numberDiff line change
@@ -3406,3 +3406,13 @@ def test_plot1d_filtered_nulls() -> None:
34063406
actual = pc.get_offsets().shape[0]
34073407

34083408
assert expected == actual
3409+
3410+
3411+
@requires_matplotlib
3412+
def test_9155() -> None:
3413+
# A test for types from issue #9155
3414+
3415+
with figure_context():
3416+
data = xr.DataArray([1, 2, 3], dims=["x"])
3417+
fig, ax = plt.subplots(ncols=1, nrows=1)
3418+
data.plot(ax=ax)

0 commit comments

Comments
 (0)