diff options
author | Muriithi Frederick Muriuki | 2021-08-31 10:48:30 +0300 |
---|---|---|
committer | Muriithi Frederick Muriuki | 2021-08-31 10:48:30 +0300 |
commit | c3f8013347e3e8850c90cb787edb2bec1f367f7d (patch) | |
tree | 3094b710f1bd0211739d21c26225521c6c5e7753 /tests/unit | |
parent | 64ce38b45839b6305b009f6e28b0f852409e9bda (diff) | |
download | genenetwork3-c3f8013347e3e8850c90cb787edb2bec1f367f7d.tar.gz |
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.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/computations/test_heatmap.py | 26 |
1 files changed, 20 insertions, 6 deletions
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) |