diff options
Diffstat (limited to 'wqflask/tests')
-rw-r--r-- | wqflask/tests/unit/wqflask/marker_regression/test_qtlreaper_mapping.py | 7 | ||||
-rw-r--r-- | wqflask/tests/unit/wqflask/marker_regression/test_rqtl_mapping.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/wqflask/tests/unit/wqflask/marker_regression/test_qtlreaper_mapping.py b/wqflask/tests/unit/wqflask/marker_regression/test_qtlreaper_mapping.py index 93848a84..8b4337ec 100644 --- a/wqflask/tests/unit/wqflask/marker_regression/test_qtlreaper_mapping.py +++ b/wqflask/tests/unit/wqflask/marker_regression/test_qtlreaper_mapping.py @@ -9,13 +9,14 @@ from wqflask.marker_regression.qtlreaper_mapping import gen_pheno_txt_file class TestQtlReaperMapping(unittest.TestCase): @mock.patch("wqflask.marker_regression.qtlreaper_mapping.TEMPDIR", "/home/user/data") def test_gen_pheno_txt_file(self): - vals = ["V1", "x", "V4", "V3","x"] - samples = ["S1", "S2", "S3", "S4","S5"] + vals = ["V1", "x", "V4", "V3", "x"] + samples = ["S1", "S2", "S3", "S4", "S5"] trait_filename = "trait_file" with mock.patch("builtins.open", mock.mock_open())as mock_open: gen_pheno_txt_file(samples=samples, vals=vals, trait_filename=trait_filename) - mock_open.assert_called_once_with("/home/user/data/gn2/trait_file.txt", "w") + mock_open.assert_called_once_with( + "/home/user/data/gn2/trait_file.txt", "w") filehandler = mock_open() write_calls = [mock.call('Trait\t'), mock.call( 'S1\tS3\tS4\n'), mock.call('T1\t'), mock.call('V1\tV4\tV3')] diff --git a/wqflask/tests/unit/wqflask/marker_regression/test_rqtl_mapping.py b/wqflask/tests/unit/wqflask/marker_regression/test_rqtl_mapping.py index 68686e27..91d2c587 100644 --- a/wqflask/tests/unit/wqflask/marker_regression/test_rqtl_mapping.py +++ b/wqflask/tests/unit/wqflask/marker_regression/test_rqtl_mapping.py @@ -28,7 +28,7 @@ class TestRqtlMapping(unittest.TestCase): def test_sanitize_rqtl_phenotype(self): """test for sanitizing rqtl phenotype""" - vals = ['f', "x", "r", "x","x"] + vals = ['f', "x", "r", "x", "x"] results = sanitize_rqtl_phenotype(vals) expected_phenotype_string = 'c(f,NA,r,NA,NA)' @@ -36,7 +36,7 @@ class TestRqtlMapping(unittest.TestCase): def test_sanitize_rqtl_names(self): """test for sanitzing rqtl names""" - vals = ['f', "x", "r", "x","x"] + vals = ['f', "x", "r", "x", "x"] expected_sanitized_name = "c('f',NA,'r',NA,NA)" results = sanitize_rqtl_names(vals) self.assertEqual(expected_sanitized_name, results) |