diff --git a/nomenclature/countries.py b/nomenclature/countries.py index 7a191c5d..504017fc 100644 --- a/nomenclature/countries.py +++ b/nomenclature/countries.py @@ -32,8 +32,9 @@ dict( name="Kosovo", alpha_3="KOS", # see https://olympics.com/ioc/kosovo + alpha_2="XK", # see https://en.wikipedia.org/wiki/XK_(user_assigned_code) note="Kosovo is recognized under UNSC resolution 1244, " - "using preliminary alpha_3 code following IOC (ISO-3166-1 not assigned)", + "using preliminary alpha_3 and alpha_2 codes (ISO-3166-1 not assigned)", ), ] diff --git a/templates/model-registration-template.xlsx b/templates/model-registration-template.xlsx index 858decf0..d91cb1c7 100644 Binary files a/templates/model-registration-template.xlsx and b/templates/model-registration-template.xlsx differ diff --git a/tests/test_countries.py b/tests/test_countries.py index 7d62e0b7..b40d7cd0 100644 --- a/tests/test_countries.py +++ b/tests/test_countries.py @@ -8,7 +8,7 @@ [("Bolivia", "Bolivia, Plurinational State of", "BOL")], ) def test_countries_override(nc_name, iso_name, alpha_3): - """Check that countries renamed from ISO 3166 can be found in both directions""" + """Check that countries renamed from ISO 3166-1 can be found in both directions""" assert countries.get(name=nc_name).alpha_3 == "BOL" assert countries.get(name=iso_name).alpha_3 == "BOL" @@ -18,12 +18,11 @@ def test_countries_override(nc_name, iso_name, alpha_3): def test_countries_add(): - """Check that countries added to ISO 3166 can be found""" + """Check that countries added beyond ISO 3166-1 can be found""" assert countries.get(name="Kosovo").name == "Kosovo" assert countries.get(name="Kosovo").alpha_3 == "KOS" - with pytest.raises(AttributeError): - countries.get(name="Kosovo").alpha_2 + assert countries.get(name="Kosovo").alpha_2 == "XK" assert "Kosovo" in countries.names