aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander_Kabui2022-08-10 08:12:48 +0300
committerFrederick Muriuki Muriithi2022-08-10 09:28:01 +0300
commit08c1486bb853367d5fb93c769d1564ca5f6d1201 (patch)
treee9ccdd3b61f2ef0f007be218bc64b0abe566d32b /tests
parentb0fc7affdf73e5a0472f75cce26c170f03f5d86d (diff)
downloadgenenetwork3-08c1486bb853367d5fb93c769d1564ca5f6d1201.tar.gz
update test;parse output
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/computations/test_rust_correlation.py17
1 files 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