From 9ab4316ee3c4d3068053c94334c64915514d8664 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 28 Feb 2024 10:55:00 +0300 Subject: tests: Update unit tests: remove use of obsoleted functions. --- tests/r_qtl/test_r_qtl2_geno.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tests/r_qtl/test_r_qtl2_geno.py') diff --git a/tests/r_qtl/test_r_qtl2_geno.py b/tests/r_qtl/test_r_qtl2_geno.py index d3c77e6..a1e69b7 100644 --- a/tests/r_qtl/test_r_qtl2_geno.py +++ b/tests/r_qtl/test_r_qtl2_geno.py @@ -273,12 +273,23 @@ def test_parse_founder_geno_files(relpath, expected): @pytest.mark.unit_test @pytest.mark.parametrize( - "filepath,expected", + "filepath,member,transposed,expected", (("tests/r_qtl/test_files/test_geno.zip", + "test_geno.csv", + False, ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")), ("tests/r_qtl/test_files/test_geno_transposed.zip", + "test_geno_transposed.csv", + True, ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")), ("tests/r_qtl/test_files/test_geno_multiple.zip", - ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")))) -def test_load_geno_samples(filepath, expected): - assert sorted(rqtl2.load_geno_samples(filepath)) == sorted(expected) + "test_geno_multiple01.csv", + False, + ("1", "2", "3", "4", "5")), + ("tests/r_qtl/test_files/test_geno_multiple.zip", + "test_geno_multiple02.csv", + False, + ("6", "7", "8", "9", "10")))) +def test_load_geno_samples(filepath, member, transposed, expected): + assert sorted(rqtl2.load_samples( + filepath, member, transposed)) == sorted(expected) -- cgit v1.2.3