Skip to content

Commit

Permalink
fixed dataset metadata tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Sep 9, 2024
1 parent ba6f3a9 commit 3ab973f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unittests/test_utils/test_dataset_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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()


Expand All @@ -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)

0 comments on commit 3ab973f

Please sign in to comment.