From 08c1486bb853367d5fb93c769d1564ca5f6d1201 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 10 Aug 2022 08:12:48 +0300 Subject: update test;parse output --- tests/unit/computations/test_rust_correlation.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/unit/computations/test_rust_correlation.py b/tests/unit/computations/test_rust_correlation.py index d5a6eb7..9a17004 100644 --- a/tests/unit/computations/test_rust_correlation.py +++ b/tests/unit/computations/test_rust_correlation.py @@ -64,16 +64,19 @@ def test_parse_results(): ["23", "-0.91", "0.11", "12"] ] - raw_dict = [{trait: { - "num_overlap": num_overlap, - "corr_coefficient": corr_coeff, - "p_value": p_val}} for (trait, corr_coeff, - p_val, num_overlap) in raw_data] + expected_results = { + trait: { + "num_overlap": num_overlap, + "corr_coefficient": corr_coeff, + "p_value": p_val} + + for (trait, corr_coeff, p_val, num_overlap) in raw_data + } assert (parse_correlation_output( "tests/unit/computations/data/correlation/sorted_results.txt", - len(raw_data)) - == raw_dict) + "sample", len(raw_data)) + == expected_results) @pytest.mark.unit_test -- cgit v1.2.3