Exemple #1
0
 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()))
Exemple #2
0
 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()))