Skip to content

Commit dcab498

Browse files
committed
test invalid cmap name
Co-authored-by: @neutrinoceros
1 parent 4955a62 commit dcab498

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmasher/tests/test_utils.py

+8
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ def test_not_enough_cmaps(self, cmaps):
116116
):
117117
combine_cmaps(cmaps)
118118

119+
# Test if invalid colormap name raise an error
120+
def test_invalid_cmap_name(self):
121+
with pytest.raises(
122+
KeyError,
123+
match="'fake_cmap' is not a known colormap name",
124+
):
125+
combine_cmaps(cmaps=["fake_cmap", "Blues"])
126+
119127
# Test if invalid colormap types raise an error
120128
@pytest.mark.parametrize(
121129
"invalid_cmap",

0 commit comments

Comments
 (0)