Skip to content

Commit

Permalink
✏️ Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Jan 2, 2025
1 parent 32143e5 commit ffa5fb1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/core/test_can_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def test_validate_int():

def test_synonym_mapping():
# only name field can be standardized
bt.Gene.from_source(symbol="TNFRSF4", organism="human").save()

bt_result = bt.Gene.public().inspect(
["ABC1", "TNFRSF4"], field="symbol", organism="human"
)
Expand All @@ -131,10 +133,14 @@ def test_synonym_mapping():
)
assert bt_result.synonyms_mapper == {}

result = bt.Gene.inspect(["SRM", "TNFRSF4"], field=bt.Gene.symbol, organism="human")
assert result.synonyms_mapper == {"SRM": "SRMS"}
result = bt.Gene.inspect(
["CD134", "TNFRSF4"], field=bt.Gene.symbol, organism="human"
)
assert result.synonyms_mapper == {"CD134": "TNFRSF4"}

result = bt.Gene.inspect(
["SRM", "TNFRSF4"], field=bt.Gene.ensembl_gene_id, organism="human"
["CD134", "TNFRSF4"], field=bt.Gene.ensembl_gene_id, organism="human"
)
assert result.synonyms_mapper == {}

bt.Gene.filter().delete()

0 comments on commit ffa5fb1

Please sign in to comment.