def test_intersect_bad_strategy(self): surface = self._make_one(self.UNIT_TRIANGLE, 1) strategy = unittest.mock.sentinel.bad_strategy with self.assertRaises(ValueError) as exc_info: surface.intersect(surface, strategy=strategy) exc_args = exc_info.exception.args self.assertEqual(exc_args, ("Unexpected strategy.", strategy))
def test_intersect_non_surface(self): surface = self._make_one(self.UNIT_TRIANGLE, 1) with self.assertRaises(TypeError): surface.intersect(object())