From 62c2e473f623d1da43c76ce1760f49c979c5f666 Mon Sep 17 00:00:00 2001
From: Colm Talbot <colm.talbot@ligo.org>
Date: Mon, 30 Jul 2018 21:02:35 -0400
Subject: [PATCH] make instantiation with too few nodes less bizarre

---
 test/calibration_tests.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/test/calibration_tests.py b/test/calibration_tests.py
index e20dbddbb..b481e2936 100644
--- a/test/calibration_tests.py
+++ b/test/calibration_tests.py
@@ -41,11 +41,12 @@ class TestCubicSpline(unittest.TestCase):
 class TestCubicSplineRequiresFourNodes(unittest.TestCase):
 
     def test_cannot_instantiate_with_too_few_nodes(self):
-        self.assertRaises(ValueError,
-                          lambda: calibration.CubicSpline('test', 1, 10, 3))
-
-    def test_can_instantiate_with_four_few_nodes(self):
-        calibration.CubicSpline('test', 1, 10, 4)
+        for ii in range(6):
+            if ii < 4:
+                with self.assertRaises(ValueError):
+                    calibration.CubicSpline('test', 1, 10, ii)
+            else:
+                calibration.CubicSpline('test', 1, 10, ii)
 
 
 if __name__ == '__main__':
-- 
GitLab