Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update unit test
Browse files Browse the repository at this point in the history
danlu1 committed May 20, 2024
1 parent 3cac57e commit 91ef469
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_clinical.py
Original file line number Diff line number Diff line change
@@ -956,8 +956,15 @@ def test_remap_clinical_values_sampletype():
)
def test_remap_clinical_values(col):
"""Test Remapping clinical values"""
testdf = pd.DataFrame({col: [1, 2, 99]})
expecteddf = pd.DataFrame({col: ["Male", "Female", "Unknown"]})
testdf = pd.DataFrame({"SEX": [1, 2, 99], "PRIMARY_RACE": [1, 2, 99]})
expecteddf = pd.DataFrame(
{
"SEX": ["Male", "Female", "Unknown"],
"PRIMARY_RACE": ["Male", "Female", "Unknown"],
"PRIMARY_RACE_DETAILED": ["Male", "Female", "Not coded"],
"SEX_DETAILED": ["Male", "Female", "Not coded"],
}
)
remappeddf = genie_registry.clinical.remap_clinical_values(
testdf, sexdf, sexdf, sexdf, sexdf
)

0 comments on commit 91ef469

Please sign in to comment.