def test_create(self): points = [Point(x, y, 1) for x, y in combinations(range(-10, 10), 2)] tree = RangeTree() tree.create(points) self.assertEqual(len(points), len(tree.traverse())) self.assertEqual(set(points), set(tree.traverse()))
def test_create_null(self): points = [] tree = RangeTree() tree.create(points) self.assertEqual(len(points), len(tree.traverse())) self.assertEqual(set(points), set(tree.traverse()))