def test_geodetic_authalic(geodetic_lat, authalic_lat):
    assert pm.geodetic2authalic(geodetic_lat) == approx(authalic_lat)
    assert pm.geodetic2authalic(radians(geodetic_lat),
                                deg=False) == approx(radians(authalic_lat))

    assert pm.authalic2geodetic(authalic_lat) == approx(geodetic_lat)
    assert pm.authalic2geodetic(radians(authalic_lat),
                                deg=False) == approx(radians(geodetic_lat))
def test_badvals(lat):
    # geodetic_isometric is not included on purpose
    with pytest.raises(ValueError):
        pm.geodetic2geocentric(lat, 0)
    with pytest.raises(ValueError):
        pm.geocentric2geodetic(lat, 0)
    with pytest.raises(ValueError):
        pm.geodetic2conformal(lat)
    with pytest.raises(ValueError):
        pm.conformal2geodetic(lat)
    with pytest.raises(ValueError):
        pm.geodetic2rectifying(lat)
    with pytest.raises(ValueError):
        pm.rectifying2geodetic(lat)
    with pytest.raises(ValueError):
        pm.geodetic2authalic(lat)
    with pytest.raises(ValueError):
        pm.authalic2geodetic(lat)
    with pytest.raises(ValueError):
        pm.geodetic2parametric(lat)
    with pytest.raises(ValueError):
        pm.parametric2geodetic(lat)
def test_numpy_geodetic_authalic():
    pytest.importorskip("numpy")
    assert pm.geodetic2authalic([45, 0]) == approx([44.87170288, 0])
    assert pm.authalic2geodetic([44.87170288, 0]) == approx([45, 0])