From 3ab973ffe537329f6a99c23c593e3807772aaf37 Mon Sep 17 00:00:00 2001 From: Martin Kozlovsky Date: Mon, 9 Sep 2024 08:45:59 +0200 Subject: [PATCH] fixed dataset metadata tests --- tests/unittests/test_utils/test_dataset_metadata.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unittests/test_utils/test_dataset_metadata.py b/tests/unittests/test_utils/test_dataset_metadata.py index a6c9edda..8dba11a8 100644 --- a/tests/unittests/test_utils/test_dataset_metadata.py +++ b/tests/unittests/test_utils/test_dataset_metadata.py @@ -21,7 +21,7 @@ def test_n_classes(metadata): with pytest.raises(ValueError): metadata.n_classes("segmentation") metadata._classes["segmentation"] = ["car", "person", "tree"] - with pytest.raises(ValueError): + with pytest.raises(RuntimeError): metadata.n_classes() @@ -32,7 +32,7 @@ def test_n_keypoints(metadata): with pytest.raises(ValueError): metadata.n_keypoints("segmentation") metadata._n_keypoints["segmentation"] = 1 - with pytest.raises(ValueError): + with pytest.raises(RuntimeError): metadata.n_keypoints() @@ -43,11 +43,11 @@ def test_class_names(metadata): with pytest.raises(ValueError): metadata.classes("segmentation") metadata._classes["segmentation"] = ["car", "person", "tree"] - with pytest.raises(ValueError): + with pytest.raises(RuntimeError): metadata.classes() def test_no_loader(): metadata = DatasetMetadata() - with pytest.raises(ValueError): + with pytest.raises(RuntimeError): metadata.autogenerate_anchors(3)