Skip to content

Commit

Permalink
fix some test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
HGWright committed Oct 31, 2024
1 parent 20bb1e3 commit 40e9a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/iris/tests/unit/fileformats/cf/test_CFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def test_formula_terms_ignore(self):

def test_auxiliary_ignore(self):
self.x.dimensions = ["lat", "wibble"]
with pytest.warns(match="Ignoring variable 'x'"):
with pytest.warns(match=r"Ignoring variable x"):
cf_group = CFReader("dummy").cf_group
promoted = ["x", "orography"]
group = cf_group.promoted
Expand All @@ -319,7 +319,7 @@ def test_promoted_auxiliary_ignore(self):
self.wibble = netcdf_variable("wibble", "lat wibble", np.float64)
self.variables["wibble"] = self.wibble
self.orography.coordinates = "wibble"
with pytest.warns(match="Ignoring variable 'wibble'") as warns:
with pytest.warns(match="Ignoring variable wibble") as warns:
cf_group = CFReader("dummy").cf_group.promoted
promoted = ["wibble", "orography"]
assert set(cf_group.keys()) == set(promoted)
Expand Down
4 changes: 3 additions & 1 deletion lib/iris/tests/unit/util/test_broadcast_to_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def test_lazy_chunks(self, mocked_compute):
mocked_compute.assert_not_called()
for i in range(3):
for j in range(4):
self.assertMaskedArrayEqual(b[i, j, :].compute(), m[0].compute())
_shared_utils.assert_masked_array_equal(
b[i, j, :].compute(), m[0].compute()
)
assert b.chunks == ((1, 1, 1), (2, 2), (2, 2, 1))

def test_masked_degenerate(self):
Expand Down

0 comments on commit 40e9a36

Please sign in to comment.