From c3f8013347e3e8850c90cb787edb2bec1f367f7d Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Tue, 31 Aug 2021 10:48:30 +0300 Subject: Fix test Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * The number of the arguments to the function changed, and so the tests for the function needed to be updated. --- tests/unit/computations/test_heatmap.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/unit/computations/test_heatmap.py b/tests/unit/computations/test_heatmap.py index 686288d..87f8e45 100644 --- a/tests/unit/computations/test_heatmap.py +++ b/tests/unit/computations/test_heatmap.py @@ -168,11 +168,25 @@ class TestHeatmap(TestCase): def test_retrieve_strains_and_values(self): """Test retrieval of strains and values.""" - for slist, tdata, expected in [ - [["s1", "s2", "s3", "s4"], [9, None, 5, 4], - (("s1", "s3", "s4"), (9, 5, 4))], - [["s1", "s2", "s3", "s4", "s5"], [6, None, None, 4, None], - (("s1", "s4"), (6, 4))]]: + for orders, slist, tdata, expected in [ + [ + [(60, 2)], + ["s1", "s2", "s3", "s4"], + [[2, 9, 6, None, 4], + [7, 5, None, None, 4], + [9, None, 5, 4, 7], + [6, None, None, 4, None]], + [[(60, 2), ["s1", "s3", "s4"], [9, 5, 4]]] + ], + [ + [(60, 3)], + ["s1", "s2", "s3", "s4", "s5"], + [[2, 9, 6, None, 4], + [7, 5, None, None, 4], + [9, None, 5, 4, 7], + [6, None, None, 4, None]], + [[(60, 3), ["s1", "s4"], [6, 4]]] + ]]: with self.subTest(strainlist=slist, traitdata=tdata): self.assertEqual( - retrieve_strains_and_values(slist, tdata), expected) + retrieve_strains_and_values(orders, slist, tdata), expected) -- cgit v1.2.3