aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorAlexander_Kabui2022-07-21 23:43:03 +0300
committerBonfaceKilz2022-07-22 14:52:08 +0300
commitd05cf3636239456a0e258c6771f6282954acaa69 (patch)
tree0ab42f008a28cc73fd33c5c98e729b9f477a1b2f /tests/unit
parent8a989237b0099467bab9875e250f07085ba48a07 (diff)
downloadgenenetwork3-d05cf3636239456a0e258c6771f6282954acaa69.tar.gz
linting and tests fixes
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/computations/data/correlation/sorted_results.txt10
-rw-r--r--tests/unit/computations/test_rust_correlation.py16
2 files changed, 14 insertions, 12 deletions
diff --git a/tests/unit/computations/data/correlation/sorted_results.txt b/tests/unit/computations/data/correlation/sorted_results.txt
index f171f5a..57885b5 100644
--- a/tests/unit/computations/data/correlation/sorted_results.txt
+++ b/tests/unit/computations/data/correlation/sorted_results.txt
@@ -1,5 +1,5 @@
-63.62,0.97,0.00
-19,-0.96,0.22
-77.92,-0.94,0.31
-84.04,0.94,0.11
-23,-0.91,0.11 \ No newline at end of file
+63.62,0.97,0.00,12
+19,-0.96,0.22,12
+77.92,-0.94,0.31,12
+84.04,0.94,0.11,12
+23,-0.91,0.11,12 \ No newline at end of file
diff --git a/tests/unit/computations/test_rust_correlation.py b/tests/unit/computations/test_rust_correlation.py
index 0fd8e94..d5a6eb7 100644
--- a/tests/unit/computations/test_rust_correlation.py
+++ b/tests/unit/computations/test_rust_correlation.py
@@ -57,16 +57,18 @@ def test_parse_results():
"""test for parsing file results"""
raw_data = [
- ["63.62", "0.97", "0.00"],
- ["19", "-0.96", "0.22"],
- ["77.92", "-0.94", "0.31"],
- ["84.04", "0.94", "0.11"],
- ["23", "-0.91", "0.11"]
+ ["63.62", "0.97", "0.00", "12"],
+ ["19", "-0.96", "0.22", "12"],
+ ["77.92", "-0.94", "0.31", "12"],
+ ["84.04", "0.94", "0.11", "12"],
+ ["23", "-0.91", "0.11", "12"]
]
raw_dict = [{trait: {
- "num_overlap": 00,
- "p_value": p_val}} for (trait, corr_coeff, p_val) in raw_data]
+ "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",