Skip to content

Commit

Permalink
test: check that kw names are unique
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltat committed Mar 31, 2024
1 parent 5e87227 commit 577d1eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utest/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ def test_json_file_format():
for translation in data.values():
assert translation.get("name"), translation
assert translation.get("doc"), translation


def test_keywords_are_unique():
lang = robotframework_browser_translation_fi.get_language()
result_path = Path(lang["path"])
with result_path.open("r") as file:
data = json.load(file)
kw_names = [translation.get("name") for translation in data.values()]
assert len(kw_names) == len(set(kw_names))

0 comments on commit 577d1eb

Please sign in to comment.