Skip to content

Commit

Permalink
Merge pull request #165 from zhx828/master
Browse files Browse the repository at this point in the history
Update tests based on v3.12
  • Loading branch information
zhx828 committed Apr 8, 2022
2 parents 66af775 + b47bdd6 commit 1458c17
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test_Annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fake_gene_one_query_suite(annotations):
annotation = annotations[0]
assert len(annotation) == NUMBER_OF_ANNOTATION_COLUMNS
assert annotation[MUTATION_EFFECT_INDEX] == UNKNOWN
assert annotation[ONCOGENIC_INDEX] == ''
assert annotation[ONCOGENIC_INDEX] == UNKNOWN
assert annotation[HIGHEST_LEVEL_INDEX] == ''


Expand Down Expand Up @@ -282,13 +282,14 @@ def test_fake_cna():
annotations = pull_cna_info(queries)
fake_gene_one_query_suite(annotations)

def check_brca2_n3214i_without_cancertype(annotation):
def check_brca2_s1882_without_cancertype(annotation):
assert len(annotation) == NUMBER_OF_ANNOTATION_COLUMNS
assert annotation[MUTATION_EFFECT_INDEX] == 'Likely Loss-of-function'
assert annotation[ONCOGENIC_INDEX] == 'Likely Oncogenic'
assert annotation[HIGHEST_LEVEL_INDEX] == 'LEVEL_1'
assert annotation[LEVEL_1_INDEX] == 'Olaparib,Olaparib+Bevacizumab,Rucaparib,Niraparib'
assert annotation[LEVEL_3A_INDEX] == 'Rucaparib,Talazoparib,Olaparib'
assert annotation[LEVEL_2_INDEX] == 'Olaparib,Rucaparib,Niraparib'
assert annotation[LEVEL_3A_INDEX] == 'Olaparib,Talazoparib'

@pytest.mark.skipif(ONCOKB_API_TOKEN in (None, ''), reason="oncokb api token required")
def test_duplicated_treatments():
Expand All @@ -301,7 +302,7 @@ def test_duplicated_treatments():
annotations = pull_protein_change_info(queries, False)
assert len(annotations) == 1

check_brca2_n3214i_without_cancertype(annotations[0])
check_brca2_s1882_without_cancertype(annotations[0])

# test genomic change query
queries = [
Expand All @@ -310,4 +311,4 @@ def test_duplicated_treatments():
annotations = pull_genomic_change_info(queries, False)
assert len(annotations) == 1

check_brca2_n3214i_without_cancertype(annotations[0])
check_brca2_s1882_without_cancertype(annotations[0])

0 comments on commit 1458c17

Please sign in to comment.