From 4bfbc86f00f91d7c5e590f7c815512fe08596b27 Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Thu, 5 Nov 2026 00:31:00 -0500 Subject: [PATCH] Run the shadowed test_strip_relative_path and fix its expectations test_configs.py defines test_strip_relative_path twice, at line 175 and 296, so the first has never run. The two test different functions, so this renames the second to test_app_strip_relative_path after the function it calls. The revived test then fails: both its expected values carry a leading slash that strip_relative_path does not produce. The live test beside it expects no leading slash anywhere, so these were wrong when written and being shadowed hid it. --- tests/unit/test_configs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_configs.py b/tests/unit/test_configs.py index d3f1bbd088..b1bd7f91e8 100644 --- a/tests/unit/test_configs.py +++ b/tests/unit/test_configs.py @@ -168,8 +168,8 @@ def test_get_relative_path( @pytest.mark.parametrize( "requests_pathname_prefix, expected", [ - (None, "/app/page2"), - ("/app/", "/page2"), + (None, "app/page2"), + ("/app/", "page2"), ], ) def test_strip_relative_path( @@ -293,7 +293,7 @@ def test_invalid_get_relative_path(prefix, partial_path): ), ], ) -def test_strip_relative_path(prefix, partial_path, expected): +def test_app_strip_relative_path(prefix, partial_path, expected): path = app_strip_relative_path(prefix, partial_path) assert path == expected