Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors in test_latex_name_isnt_split for min environments #5710

Merged
merged 4 commits into from
Aug 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions xarray/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ def test_label_from_attrs(self):
da.attrs.pop("units")
assert "a" == label_from_attrs(da)

# Latex strings can be longer without needing a new line:
long_latex_name = r"$Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$"
da.attrs = dict(long_name=long_latex_name)
assert label_from_attrs(da) == long_latex_name

def test1d(self):
self.darray[:, 0, 0].plot()

Expand Down Expand Up @@ -2950,10 +2955,3 @@ def test_datarray_scatter(x, y, z, hue, markersize, row, col, add_legend, add_co
add_legend=add_legend,
add_colorbar=add_colorbar,
)


def test_latex_name_isnt_split():
da = xr.DataArray()
long_latex_name = r"$Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$"
da.attrs = dict(long_name=long_latex_name)
assert label_from_attrs(da) == long_latex_name