aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/computations/test_slink.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/computations/test_slink.py b/tests/unit/computations/test_slink.py
index dd42d5d..bdfaf6d 100644
--- a/tests/unit/computations/test_slink.py
+++ b/tests/unit/computations/test_slink.py
@@ -2,6 +2,7 @@
import unittest
from unittest import TestCase
+from gn3.computations.slink import slink
from gn3.computations.slink import nearest
from gn3.computations.slink import LengthError
from gn3.computations.slink import MirrorError
@@ -200,3 +201,8 @@ class TestSlink(TestCase):
expected_distance=ed):
self.assertEqual(nearest(md, ml, mc), ed)
self.assertEqual(nearest(md, mc, ml), ed)
+
+ def test_slink_wrong_data_returns_empty_list(self):
+ for data in [1, "test", [], 2.945, nearest]:
+ with self.subTest(data=data):
+ self.assertEqual(slink(data), [])