Skip to content

Commit

Permalink
update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
danlu1 committed Mar 12, 2024
1 parent ea7c915 commit 083ab0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion genie_registry/maf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _check_tsa1_tsa2(df):
):
error = (
"maf: Contains instances where values in REFERENCE_ALLELE match values in TUMOR_SEQ_ALLELE2. "
"This is invalid. Please correct."
"This is invalid. Please correct.\n"
)
row_index = df.query("REFERENCE_ALLELE == TUMOR_SEQ_ALLELE2").index.values
return error
Expand Down
7 changes: 5 additions & 2 deletions tests/test_maf.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def test_invalid__check_tsa1_tsa2():
"REFERENCE_ALLELE or all values in TUMOR_SEQ_ALLELE2.\n"
)


def test_invalid__check_ref_tsa2():
"""Test the scenario in which maf file has identical REF and tsa2 and fails"""
df = pd.DataFrame(
Expand All @@ -269,10 +270,11 @@ def test_invalid__check_ref_tsa2():
)
error = genie_registry.maf._check_tsa1_tsa2(df)
assert error == (
"REFERENCE_ALLELE should not equal to TUMOR_SEQ_ALLELE2. "
"Please check row: 1.\n"
"maf: Contains instances where values in REFERENCE_ALLELE match values in TUMOR_SEQ_ALLELE2. "
"This is invalid. Please correct.\n"
)


def test_invalid__check_ref_tsa1_tsa2():
"""Test the scenario in which maf file has TSA1 and TSA2 and fails"""
df = pd.DataFrame(
Expand All @@ -292,6 +294,7 @@ def test_invalid__check_ref_tsa1_tsa2():
"Please check row: 1.\n"
)


@pytest.mark.parametrize(
"df",
[
Expand Down

0 comments on commit 083ab0f

Please # to comment.