def test_get_coord_one(self): """Test get coordinate from tile method.""" merc = Mercator() z = x = y = 0 mx, my = merc.get_coord(z, x, y) mx = merc.truncate(mx) my = merc.truncate(my) assert float(mx) == -20037508.34 and \ float(my) == -20037508.34
def test_get_coord_two(self): """Test get coord with a random tile.""" merc = Mercator() z = 14 x = 11332 y = 9870 mx, my = merc.get_coord(z, x, y) mx = merc.truncate(mx) my = merc.truncate(my) assert float(mx) == 7680392.60 and \ float(my) == 4104362.67