Skip to content

Commit

Permalink
Merge pull request #46 from TranslatorSRI/case-insensitive-labels
Browse files Browse the repository at this point in the history
When checking the preferred label, we now compare those case insensitively.
  • Loading branch information
gaurav authored Nov 8, 2024
2 parents 1bf758f + 5ac8380 commit 81181a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/nameres/test_nameres_from_gsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_label(target_info, test_row, test_category):

# Test the preferred label if there is one.
if test_row.PreferredLabel:
assert top_result['label'] == test_row.PreferredLabel, f"{test_summary} returned preferred " + \
assert top_result['label'].lower() == test_row.PreferredLabel.lower(), f"{test_summary} returned preferred " + \
f"label {top_result['label']} instead of {test_row.PreferredLabel}."

# Additionally, test the biolink_class_exclude field if there is one.
Expand Down
4 changes: 2 additions & 2 deletions tests/nodenorm/test_nodenorm_from_gsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def test_normalization(target_info, test_row, test_category):
f"identifier {expected_id}.")

# Test preferred label
if test_row.PreferredLabel:
assert result['id']['label'] == preferred_label,\
if preferred_label:
assert result['id']['label'].lower() == preferred_label.lower(),\
f"{test_summary} but preferred label is {result['id']['label']}, not expected label {preferred_label}."

# Test Biolink types
Expand Down

0 comments on commit 81181a3

Please sign in to comment.