about summary refs log tree commit diff
path: root/tests/unit/computations
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-11-29 14:02:56 +0300
committerFrederick Muriuki Muriithi2021-11-29 14:02:56 +0300
commit4c3863a6fd5d1864c135bddfe02d06c98a19ca18 (patch)
treed36768f8a51941e09ae6556fb306271e570a25ea /tests/unit/computations
parent99953f6e4a540da41d0517203eb63da4e19405cd (diff)
downloadgenenetwork3-4c3863a6fd5d1864c135bddfe02d06c98a19ca18.tar.gz
Update test for data changes
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
Diffstat (limited to 'tests/unit/computations')
-rw-r--r--tests/unit/computations/test_partial_correlations.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/unit/computations/test_partial_correlations.py b/tests/unit/computations/test_partial_correlations.py
index 3e1b6e1..3690ca4 100644
--- a/tests/unit/computations/test_partial_correlations.py
+++ b/tests/unit/computations/test_partial_correlations.py
@@ -193,7 +193,7 @@ class TestPartialCorrelations(TestCase):
 
         Given:
             - the name of a primary trait
-            - the value of a primary trait
+            - a sequence of values for the primary trait
             - a sequence of names of control traits
             - a sequence of values of control traits
         When:
@@ -204,12 +204,14 @@ class TestPartialCorrelations(TestCase):
               decimal places are considered
         """
         for primn, primv, contn, contv, expected in (
-                ("pt", 12.98395, ("ct0", "ct1", "ct2"),
-                 (0.1234, 2.3456, 3.4567), tuple()),
-                ("pt", 12.98395, ("ct0", "ct1", "ct2"),
-                 (12.98354, 2.3456, 3.4567), ("pt", "ct0")),
-                ("pt", 12.98395, ("ct0", "ct1", "ct2", "ct3"),
-                 (0.1234, 2.3456, 0.1233, 4.5678), ("ct0", "ct2"))
+                ("pt", (12.98395,), ("ct0", "ct1", "ct2"),
+                 ((0.1234, 2.3456, 3.4567),), tuple()),
+                ("pt", (12.98395, 2.3456, 3.4567), ("ct0", "ct1", "ct2"),
+                 ((12.98354, 2.3456, 3.4567), (64.2334, 6.3256, 64.2364),
+                  (4.2374, 67.2345, 7.48234)), ("pt", "ct0")),
+                ("pt", (12.98395, 75.52382), ("ct0", "ct1", "ct2", "ct3"),
+                 ((0.1234, 2.3456), (0.3621, 6543.572), (0.1234, 2.3456),
+                  (0.1233, 4.5678)), ("ct0", "ct2"))
         ):
             with self.subTest(
                     primary_name=primn, primary_value=primv,