Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests based on v3.12 #165

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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])