diff options
Diffstat (limited to 'tests/unit/computations')
| -rw-r--r-- | tests/unit/computations/test_partial_correlations.py | 4 | ||||
| -rw-r--r-- | tests/unit/computations/test_wgcna.py | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/unit/computations/test_partial_correlations.py b/tests/unit/computations/test_partial_correlations.py index 066c650..6364701 100644 --- a/tests/unit/computations/test_partial_correlations.py +++ b/tests/unit/computations/test_partial_correlations.py @@ -159,8 +159,8 @@ class TestPartialCorrelations(TestCase): "variance": None}}}, dictified_control_samples), (("BXD2",), (7.80944,), - (7.51879, 7.77141, 8.39265, 8.17443, 8.30401, 7.80944, 8.39265, - 8.17443, 8.30401, 7.80944, 7.51879, 7.77141, 7.80944), + ((7.51879, 7.77141, 8.39265, 8.17443, 8.30401, 7.80944, 8.39265, + 8.17443, 8.30401, 7.80944, 7.51879, 7.77141, 7.80944),), (None,), (None, None, None, None, None, None, None, None, None, None, None, None, None))) diff --git a/tests/unit/computations/test_wgcna.py b/tests/unit/computations/test_wgcna.py index 55432af..325bd5a 100644 --- a/tests/unit/computations/test_wgcna.py +++ b/tests/unit/computations/test_wgcna.py @@ -85,9 +85,9 @@ class TestWgcna(TestCase): mock_img.return_value = b"AFDSFNBSDGJJHH" results = call_wgcna_script( - "Rscript/GUIX_PATH/scripts/r_file.R", request_data) + "Rscript/GUIX_PATH/scripts/r_file.R", request_data, "/tmp") - mock_dumping_data.assert_called_once_with(request_data) + mock_dumping_data.assert_called_once_with(request_data, "/tmp") mock_compose_wgcna.assert_called_once_with( "Rscript/GUIX_PATH/scripts/r_file.R", @@ -119,7 +119,7 @@ class TestWgcna(TestCase): mock_run_cmd.return_value = expected_error self.assertEqual(call_wgcna_script( - "input_file.R", ""), expected_error) + "input_file.R", "", "/tmp"), expected_error) @pytest.mark.skip( "This test assumes that the system will always be invoked from the root" @@ -134,7 +134,6 @@ class TestWgcna(TestCase): wgcna_cmd, "Rscript scripts/wgcna.r /tmp/wgcna.json") @pytest.mark.unit_test - @mock.patch("gn3.computations.wgcna.TMPDIR", "/tmp") @mock.patch("gn3.computations.wgcna.uuid.uuid4") def test_create_json_file(self, file_name_generator): """test for writing the data to a csv file""" @@ -166,8 +165,7 @@ class TestWgcna(TestCase): file_name_generator.return_value = "facb73ff-7eef-4053-b6ea-e91d3a22a00c" - results = dump_wgcna_data( - expected_input) + results = dump_wgcna_data(expected_input, "/tmp") file_handler.assert_called_once_with( "/tmp/facb73ff-7eef-4053-b6ea-e91d3a22a00c.json", 'w', encoding='utf-8') |
