Skip to content
Snippets Groups Projects
Commit 62c2e473 authored by Colm Talbot's avatar Colm Talbot
Browse files

make instantiation with too few nodes less bizarre

parent 85579a24
No related branches found
No related tags found
1 merge request!113Add calibration
Pipeline #26762 passed
......@@ -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__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment