aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorAlexander Kabui2021-04-18 23:52:04 +0300
committerAlexander Kabui2021-04-18 23:52:04 +0300
commitd266ca9d59093c253ce7b56f9a14119869eb0003 (patch)
treeaf3fde7e4ad9ec7b34c8ec6811940e97e8d60d19 /tests/unit
parentba1ea53443b8085700df2941e68421bcc8206c8b (diff)
downloadgenenetwork3-d266ca9d59093c253ce7b56f9a14119869eb0003.tar.gz
refactor:return trait_name in corr_results
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/computations/test_correlation.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/unit/computations/test_correlation.py b/tests/unit/computations/test_correlation.py
index 9f3feab..8bb5cd1 100644
--- a/tests/unit/computations/test_correlation.py
+++ b/tests/unit/computations/test_correlation.py
@@ -120,21 +120,24 @@ class TestCorrelation(TestCase):
[3.4, 6.2, 4, 1.1, 8, 1.1], 6)
compute_corr.side_effect = [(0.7, 0.3), (-1.0, 0.9), (1, 0.21)]
- pearson_results = compute_sample_r_correlation(corr_method="pearson",
+ pearson_results = compute_sample_r_correlation(trait_name="1412_at",
+ corr_method="pearson",
trait_vals=primary_values,
target_samples_vals=target_values)
- spearman_results = compute_sample_r_correlation(corr_method="spearman",
+ spearman_results = compute_sample_r_correlation(trait_name="1412_at",
+ corr_method="spearman",
trait_vals=primary_values,
target_samples_vals=target_values)
- bicor_results = compute_sample_r_correlation(corr_method="bicor",
+ bicor_results = compute_sample_r_correlation(trait_name="1412_at",
+ corr_method="bicor",
trait_vals=primary_values,
target_samples_vals=target_values)
- self.assertEqual(bicor_results, (1, 0.21, 6))
- self.assertEqual(pearson_results, (0.7, 0.3, 6))
- self.assertEqual(spearman_results, (-1.0, 0.9, 6))
+ self.assertEqual(bicor_results, ("1412_at", 1, 0.21, 6))
+ self.assertEqual(pearson_results, ("1412_at", 0.7, 0.3, 6))
+ self.assertEqual(spearman_results, ("1412_at", -1.0, 0.9, 6))
self.assertIsInstance(
pearson_results, tuple, "message")