Skip to content

Commit

Permalink
Make test output slightly more readable if slot missing (home-assista…
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Dec 27, 2022
1 parent 8d859ca commit e1b1ce8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_language_sentences.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ def do_test_language_sentences_file(
if not isinstance(slot_dict, dict):
slot_dict = {"value": slot_dict}
assert (
slot_name in result.entities
slot_name
in
# wrap it in a list to get more readable pytest assertion
list(result.entities)
), f"For '{sentence}' did not receive slot '{slot_name}'"
assert result.entities[slot_name].value == slot_dict["value"]

Expand Down

0 comments on commit e1b1ce8

Please sign in to comment.