Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
tuturu-tech committed Jun 13, 2024
1 parent 29dca24 commit e08d458
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_corpus_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def compare_corpus_with_expected(expected_corpus: list, new_corpus: list) -> Non
"""Compares two corpora, failing if they're not the same"""
assert len(expected_corpus) == len(new_corpus)
expected_corpus_sorted = sorted(expected_corpus, key=lambda d: d["name"])
new_corpus_sorted = sorted(new_corpus, key=lambda d: os.path.normpath(d["path"]).split(os.path.sep)[-1])
new_corpus_sorted = sorted(
new_corpus, key=lambda d: os.path.normpath(d["path"]).split(os.path.sep)[-1]
)
for idx, item in enumerate(new_corpus_sorted):
name = os.path.normpath(item["path"]).split(os.path.sep)[-1]
assert expected_corpus_sorted[idx]["name"] == name
Expand Down

0 comments on commit e08d458

Please sign in to comment.