diff --git a/pyproj/_crs.pyx b/pyproj/_crs.pyx index 529b23c44..b536c61fc 100644 --- a/pyproj/_crs.pyx +++ b/pyproj/_crs.pyx @@ -198,6 +198,7 @@ cdef PJ * _from_name( PJ * """ cdef PJ_TYPE[1] pj_types = [pj_type] + cdef char* c_auth_name = NULL if auth_name is not None: b_auth_name = cstrencode(auth_name) c_auth_name = b_auth_name diff --git a/test/test_crs.py b/test/test_crs.py index ea3518a63..5b13f81a0 100644 --- a/test/test_crs.py +++ b/test/test_crs.py @@ -833,10 +833,11 @@ def test_datum__from_name(input_name): assert dd.name == "World Geodetic System 1984" -def test_datum_from_name__auth_type(): +@pytest.mark.parametrize("auth_name", [None, "ESRI"]) +def test_datum_from_name__auth_type(auth_name): dd = Datum.from_name( "WGS_1984_Geoid", - auth_name="ESRI", + auth_name=auth_name, datum_type=DatumType.VERTICAL_REFERENCE_FRAME, ) assert dd.name == "WGS_1984_Geoid"