Skip to content

Commit de867e6

Browse files
authored
Fix errors in test_latex_name_isnt_split for min environments (#5710)
1 parent 4109966 commit de867e6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

xarray/tests/test_plot.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ def test_label_from_attrs(self):
185185
da.attrs.pop("units")
186186
assert "a" == label_from_attrs(da)
187187

188+
# Latex strings can be longer without needing a new line:
189+
long_latex_name = r"$Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$"
190+
da.attrs = dict(long_name=long_latex_name)
191+
assert label_from_attrs(da) == long_latex_name
192+
188193
def test1d(self):
189194
self.darray[:, 0, 0].plot()
190195

@@ -2950,10 +2955,3 @@ def test_datarray_scatter(x, y, z, hue, markersize, row, col, add_legend, add_co
29502955
add_legend=add_legend,
29512956
add_colorbar=add_colorbar,
29522957
)
2953-
2954-
2955-
def test_latex_name_isnt_split():
2956-
da = xr.DataArray()
2957-
long_latex_name = r"$Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$"
2958-
da.attrs = dict(long_name=long_latex_name)
2959-
assert label_from_attrs(da) == long_latex_name

0 commit comments

Comments
 (0)