Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clinton-encord committed Dec 31, 2024
1 parent 1084f6f commit ee042ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion encord/objects/classification_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def _is_selectable_child_attribute(self, attribute: Attribute) -> bool:
def _check_within_range(self, frame: int) -> None:
if frame < 0 or frame >= self._last_frame:
raise LabelRowError(
f"The supplied frame of `{frame}` is not within the acceptable bounds of `0` to `{self._last_frame}`."
f"The supplied frame of `{frame}` is not within the acceptable bounds of `0` to `{self._last_frame}`. "
f"Note: for non-geometric data (e.g. {DataType.AUDIO} and {DataType.PLAIN_TEXT}), "
f"the entire file only has 1 frame."
)
Expand Down
3 changes: 2 additions & 1 deletion tests/objects/test_label_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,8 @@ def test_audio_classification_exceed_max_frames(ontology, empty_audio_label_row:
with pytest.raises(LabelRowError) as e:
classification_instance.set_for_frames(frames=5000)

assert e.value.message == "The supplied frame of `5000` is not within the acceptable bounds of `0` to `1`."
assert e.value.message == ("The supplied frame of `5000` is not within the acceptable bounds of `0` to `1`. "
"Note: for non-geometric data (e.g. AUDIO and PLAIN_TEXT), the entire file only has 1 frame.")

range_list = classification_instance.range_list
assert len(range_list) == 1
Expand Down

0 comments on commit ee042ae

Please sign in to comment.