Skip to content

Commit

Permalink
catch a few more lines
Browse files Browse the repository at this point in the history
  • Loading branch information
juliettelavoie committed Feb 22, 2024
1 parent 85b425c commit 356df09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,21 @@ def test_measures_improvement(self):
p1, m1 = xs.properties_and_measures(
self.ds,
properties=self.yaml_file,
period=["2001", "2001"],
)

p2, m2 = xs.properties_and_measures(
self.ds,
properties=self.yaml_file,
dref_for_measure=p1,
period=["2001", "2001"],
)

out = xs.diagnostics.measures_improvement([m2, m2], to_level="test")
with pytest.warns(
UserWarning,
match="meas_datasets has more than 2 datasets."
+ " Only the first 2 will be compared.",
):
out = xs.diagnostics.measures_improvement([m2, m2, m2], to_level="test")

assert out.attrs["cat:processing_level"] == "test"
assert "mean-tas" in out.properties.values
Expand Down Expand Up @@ -470,7 +476,7 @@ def test_measures_improvement_2d(self):
out2 = xs.diagnostics.measures_improvement_2d(
{
"i1": [m2, m2],
"i2": [m2, m2],
"i2": {"a": m2, "b": m2},
},
to_level="test",
)
Expand Down

0 comments on commit 356df09

Please sign in to comment.