def test_compute_path(self): """Tests that the correct path is computed when a col,row,depth is given to compute_path """ for path in quadtree.iterate_base4(7): t1 = Tile.from_path(path) col = t1.col row = t1.row depth = len(path) t2 = Tile.compute_path(col, row, depth) self.assertEqual(t1, t2)
def test_depth2_compute_path(self): """Test comptue_path on all 16 tiles of a depth 2 tree""" for (col, row), path in items: t = Tile.compute_path(col, row, 2) self.assertEqual(t.path, path)