From 2223d05ad359f3507085d2d3060c7a205cf95980 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Thu, 3 Oct 2024 17:05:01 +0200 Subject: [PATCH] fix --- tests/test_cmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cmap.py b/tests/test_cmap.py index 129f00f4..7d1c42c6 100644 --- a/tests/test_cmap.py +++ b/tests/test_cmap.py @@ -78,7 +78,7 @@ def test_cmap_json(): "bad": pathlib.Path(PREFIX) / "bad.json", } ) - assert len(new_cmap.list()) == colormap_number + 2 + assert len(new_cmap.list()) == colormap_number + 3 nlcd = new_cmap.get("nlcd") assert isinstance(nlcd, dict) assert nlcd[11] == (72, 109, 162, 255) @@ -88,7 +88,7 @@ def test_cmap_json(): assert seq[0][0] == (1, 2) assert seq[0][1] == (255, 0, 0, 255) - with pytest.raises(json.JSONDecodeError): + with pytest.raises((json.JSONDecodeError, ValueError)): new_cmap.get("bad")