From 9fda89e8e1740d7bfc7ba026a57f22763a00aa56 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 03:54:31 +0000 Subject: [PATCH] test: expand coverage for colo_location Added explicit tests for 'LHR' known code mapping, lowercase inputs ('dme'), and empty strings handling for edge cases. Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com> --- tests/test_bgp_path.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_bgp_path.py b/tests/test_bgp_path.py index d3bbb18..3a60224 100644 --- a/tests/test_bgp_path.py +++ b/tests/test_bgp_path.py @@ -45,9 +45,8 @@ def test_parse_cf_ray_trailing_dash_empty_suffix(): def test_colo_location_known_code(): - city, country = colo_location("DME") - assert country == "RU" - assert city + assert colo_location("LHR") == ("London", "GB") + assert colo_location("dme") == ("Moscow", "RU") def test_colo_location_unknown_code(): @@ -56,6 +55,7 @@ def test_colo_location_unknown_code(): def test_colo_location_none(): assert colo_location(None) == (None, None) + assert colo_location("") == (None, None) def test_detect_international_loop_true_when_edge_diverges():