Skip to content

Commit 0647d3a

Browse files
authored
Add more rich repr tests (#455)
* Add more rich repr tests * ffix test? * fix?
1 parent 62b50fb commit 0647d3a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cf_xarray/tests/test_accessor.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,12 +1848,13 @@ def test_flag_errors(self) -> None:
18481848
with pytest.raises(ValueError):
18491849
flag_mix.cf == "ERR"
18501850

1851-
flag_excl.attrs.pop("flag_values")
1851+
flag_ex = flag_excl.copy()
1852+
flag_ex.attrs.pop("flag_values")
18521853
with pytest.raises(ValueError):
1853-
flag_excl.cf.isin(["flag_1"])
1854+
flag_ex.cf.isin(["flag_1"])
18541855

18551856
with pytest.raises(ValueError):
1856-
flag_excl.cf == "flag_1"
1857+
flag_ex.cf == "flag_1"
18571858

18581859
with pytest.raises(ValueError):
18591860
basin.cf == "arctic_ocean"
@@ -1955,6 +1956,9 @@ def plane(coords, slopex, slopey):
19551956
[airds.air, "Coordinates"],
19561957
[popds, "Data Variables"],
19571958
[basin, "Flag Variable"],
1959+
[flag_mix, "Flag Variable"],
1960+
[flag_indep, "Flag Variable"],
1961+
[flag_excl, "Flag Variable"],
19581962
[dsg, "Discrete Sampling Geometry"],
19591963
),
19601964
)

0 commit comments

Comments
 (0)