Skip to content

Commit 3e02273

Browse files
committed
Test for specific error messages raised
1 parent f3e534e commit 3e02273

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/unit/transpose_writers/test_chunking_helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ def test_broadcast_and_match(self) -> None:
133133
assert result == grids
134134

135135
# Mismatch raises error
136-
with pytest.raises(ValueError):
136+
with pytest.raises(
137+
ValueError, match="chunk_grid list length must be 1 or equal to the number of new variables"
138+
):
137139
_normalize_chunk_grid([grid, grid], 3)
138140

139141

@@ -160,5 +162,7 @@ def test_broadcast_and_match(self) -> None:
160162
assert result[1] is None
161163

162164
# Mismatch raises error
163-
with pytest.raises(ValueError):
165+
with pytest.raises(
166+
ValueError, match="compressor list length must be 1 or equal to the number of new variables"
167+
):
164168
_normalize_compressor([comp, comp], 3)

0 commit comments

Comments
 (0)