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 iterate_base4(7):
            t1 = RenderTile.from_path(path)
            col = t1.col
            row = t1.row
            depth = len(path)

            t2 = RenderTile.compute_path(col, row, depth)
            self.assertEqual(t1, t2)
Example #2
0
    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 iterate_base4(7):
            t1 = RenderTile.from_path(path)
            col = t1.col
            row = t1.row
            depth = len(path)

            t2 = RenderTile.compute_path(col, row, depth)
            self.assertEqual(t1, t2)
 def test_depth2_from_path(self):
     """Test frompath on all 16 tiles of a depth 2 tree"""
     for (col, row), path in items:
         t = RenderTile.from_path(path)
         self.assertEqual(t.col, col)
         self.assertEqual(t.row, row)
Example #4
0
 def test_depth2_from_path(self):
     """Test frompath on all 16 tiles of a depth 2 tree"""
     for (col, row), path in items:
         t = RenderTile.from_path(path)
         self.assertEqual(t.col, col)
         self.assertEqual(t.row, row)