From 343c632d2a6626c0c46aec588ab50c373550c5c4 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 11 Feb 2025 00:11:36 +0000 Subject: [PATCH] Fix test when symlink encountered (#10447) --- tests/test_urldispatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py index 61bd415f562..01eb686fd3c 100644 --- a/tests/test_urldispatch.py +++ b/tests/test_urldispatch.py @@ -373,7 +373,7 @@ def test_add_static_path_resolution(router: web.UrlDispatcher) -> None: """Test that static paths are expanded and absolute.""" res = router.add_static("/", "~/..") directory = str(res.get_info()["directory"]) - assert directory == str(pathlib.Path.home().parent) + assert directory == str(pathlib.Path.home().resolve(strict=True).parent) def test_add_static(router: web.UrlDispatcher) -> None: