Exemple #1
0
 def test_intersect_bad_strategy(self):
     curve = self._make_one(self.ZEROS, 1)
     strategy = unittest.mock.sentinel.bad_strategy
     with self.assertRaises(ValueError) as exc_info:
         curve.intersect(curve, strategy=strategy)
     exc_args = exc_info.exception.args
     self.assertEqual(exc_args, ("Unexpected strategy.", strategy))
Exemple #2
0
 def test_intersect_non_curve(self):
     nodes = np.asfortranarray([
         [0.0, 0.0],
         [0.5, -0.25],
         [1.0, 0.0],
     ])
     curve = self._make_one(nodes, 2)
     with self.assertRaises(TypeError):
         curve.intersect(object())