diff options
Diffstat (limited to 'tests/r_qtl/test_r_qtl2_pheno.py')
-rw-r--r-- | tests/r_qtl/test_r_qtl2_pheno.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/r_qtl/test_r_qtl2_pheno.py b/tests/r_qtl/test_r_qtl2_pheno.py index c7c0c86..d31ad54 100644 --- a/tests/r_qtl/test_r_qtl2_pheno.py +++ b/tests/r_qtl/test_r_qtl2_pheno.py @@ -57,3 +57,14 @@ def test_parse_phenocovar_files(filepath, expected): with ZipFile(Path(filepath).absolute(), "r") as zfile: cdata = rqtl2.control_data(zfile) assert tuple(rqtl2.file_data(zfile, "phenocovar", cdata)) == expected + + +@pytest.mark.unit_test +@pytest.mark.parametrize( + "filepath,expected", + (("tests/r_qtl/test_files/test_pheno.zip", + ("1", "2", "3", "4", "5")), + ("tests/r_qtl/test_files/test_pheno_transposed.zip", + ("1", "2", "3", "4", "5")))) +def test_load_geno_samples(filepath, expected): + assert sorted(rqtl2.load_pheno_samples(filepath)) == sorted(expected) |