From 4c3863a6fd5d1864c135bddfe02d06c98a19ca18 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 29 Nov 2021 14:02:56 +0300 Subject: Update test for data changes Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi --- tests/unit/computations/test_partial_correlations.py | 16 +++++++++------- 1 file 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, -- cgit v1.2.3