aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexanderlacuna2020-11-11 23:05:17 +0300
committerAlexanderlacuna2020-11-11 23:05:17 +0300
commit424f44c0656da8f99dce0fa0a00bd5e6ba9bace3 (patch)
tree05472080464eccb3fc26cdea5da1c67fab7ed9bc /wqflask
parent96dd0a10f0bfe66afab9701dd028f169d63cdae5 (diff)
downloadgenenetwork2-424f44c0656da8f99dce0fa0a00bd5e6ba9bace3.tar.gz
add tests for marker_regression/gemma_mapping.py
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/tests/wqflask/marker_regression/test_gemma_mapping.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wqflask/tests/wqflask/marker_regression/test_gemma_mapping.py b/wqflask/tests/wqflask/marker_regression/test_gemma_mapping.py
index 06ce55d8..ed72cb33 100644
--- a/wqflask/tests/wqflask/marker_regression/test_gemma_mapping.py
+++ b/wqflask/tests/wqflask/marker_regression/test_gemma_mapping.py
@@ -151,18 +151,21 @@ X\tgn7\t2324424\tQ\tE\tA\tP\tMMB\tCDE\t0.4
mock_open.assert_called_once_with(
"/home/user/img/gema_file_output.assoc.txt")
self.assertEqual(results, expected)
+
@mock.patch("wqflask.marker_regression.gemma_mapping.webqtlConfig.GENERATED_IMAGE_DIR", "/home/user/img")
def test_parse_gemma_output_empty_return(self):
output_file_results = """chr\t today"""
with mock.patch("builtins.open", mock.mock_open(read_data=output_file_results)) as mock_open:
results = parse_gemma_output(genofile_name="gema_file")
self.assertEqual(results, [])
+
@mock.patch("wqflask.marker_regression.gemma_mapping.TEMPDIR", "/home/tmp")
@mock.patch("wqflask.marker_regression.gemma_mapping.os")
def test_parse_loco_output_file_found(self, mock_os):
mock_os.path.isfile.return_value = True
file_to_write = """{"files":["file_1","file_2"]}"""
pass
+
@mock.patch("wqflask.marker_regression.gemma_mapping.TEMPDIR", "/home/tmp")
@mock.patch("wqflask.marker_regression.gemma_mapping.os")
def test_parse_loco_output_file_not_found(self, mock_os):