From a5d4868c6d2f38d3e6fd0409e08413c3569ce356 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Wed, 21 Jul 2021 08:44:09 +0300 Subject: Extract tests from code in GN1 Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * gn3/computations/slink.py: Add dummy `nearest' function * tests/unit/computations/test_slink.py: Add some tests This commit adds tests to try and reproduce the working of the `nearest' function in: https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/slink.py This commit might not yet have extracted all the expected behaviour of the `nearest' function, and therefore, there is a possibility of a later commit augmenting the work in this commit. --- gn3/computations/slink.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gn3/computations/slink.py (limited to 'gn3/computations') diff --git a/gn3/computations/slink.py b/gn3/computations/slink.py new file mode 100644 index 0000000..bec8597 --- /dev/null +++ b/gn3/computations/slink.py @@ -0,0 +1,8 @@ +class LengthError(BaseException): + pass + +class MirrorError(BaseException): + pass + +def nearest(lists, i, j): + return None -- cgit v1.2.3