Place the Danish regions as Akademikernes Jobbank writes them: Storkøbenhavn and Nordsjælland in the Capital Region, the Zealand and Jutland labels in their regions, and Udlandet (øvrige) as no place

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-05 09:20:21 +02:00
1 parent 1127d06f03
commit b6d0a54f39
2 files changed
+22 -4

No files matched your search

+15
View File
@@ -141,6 +141,21 @@ def test_europe_is_every_european_country_and_eu() -> None:
assert not {"US", "CN"} & codes
def test_a_danish_region_as_akademikernes_jobbank_writes_it_is_placed() -> None:
# The labels of the site's search form. Unplaced, "Storkøbenhavn;
# Øresundsregionen" was known only as Øresund, which lies in no country.
assert names("Storkøbenhavn") == ["Capital Region of Denmark"]
assert names("Nordsjælland") == ["Capital Region of Denmark"]
for text in ("Østsjælland", "Vestsjælland", "Sydsjælland & Øer"):
assert names(text) == ["Zealand"]
for text in ("Sydøstjylland", "Sydvestjylland"):
assert names(text) == ["Jutland"]
assert names("Storkøbenhavn; Øresundsregionen") == ["Capital Region of Denmark", "Øresund"]
# "Abroad (other)" names no place, so it is not listed as unresolved.
assert names("Udlandet (øvrige)") == [] and places.placeless("Udlandet (øvrige)")
assert names("Udlandet (Sverige)") == ["Sweden"]
def test_oresund_holds_both_capital_regions() -> None:
under = GAZ.under(GAZ.lookup("region:oresund") or ())
assert {GAZ.by_key[("city", "malmo")], GAZ.by_key[("city", "copenhagen")]} <= under