Skip to content

Commit

Permalink
Update model-registration template to include Kosovo codes (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann authored Sep 5, 2024
1 parent 08748f5 commit 65f005c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion nomenclature/countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
),
]

Expand Down
Binary file modified templates/model-registration-template.xlsx
Binary file not shown.
7 changes: 3 additions & 4 deletions tests/test_countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 65f005c

Please sign in to comment.