Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
 def test_intersect_non_surface(self):
     surface = self._make_one(self.UNIT_TRIANGLE, 1)
     with self.assertRaises(TypeError):
         surface.intersect(object())