Пример #1
0
 def test_box_contains_box(self):
     box = Bounds(Point(5, -2, 0), Point(11, 4, 7))
     BoundsResult = namedtuple("BoundsResult", ["min", "max", "result"])
     bounds_results = [
         BoundsResult(Point(5, -2, 0), Point(11, 4, 7), True),
         BoundsResult(Point(6, -1, 1), Point(10, 3, 6), True),
         BoundsResult(Point(4, -3, -1), Point(10, 3, 6), False),
         BoundsResult(Point(6, -1, 1), Point(12, 5, 8), False)
     ]
     for bounds_result in bounds_results:
         box2 = Bounds(bounds_result.min, bounds_result.max)
         self.assertEqual(box.box_contains_box(box2), bounds_result.result)