From a7b0fd867336157c4cb1a7478934290239b93508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E7=AB=8B=E9=9B=84?= Date: Sat, 16 May 2026 18:34:10 +0800 Subject: [PATCH] fix(#5378): use path.parts for cross-platform config path assertion Replace str.endswith('.clawrtc/config.json') with path.parts[-2:] tuple comparison so the assertion works on Windows and other platforms where path separators differ. --- miners/clawrtc/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miners/clawrtc/test_config.py b/miners/clawrtc/test_config.py index 9a3cdf4dc..583d1a9aa 100644 --- a/miners/clawrtc/test_config.py +++ b/miners/clawrtc/test_config.py @@ -41,7 +41,7 @@ def sample_config(): class TestGetConfigPath: def test_default_path(self): path = get_config_path() - assert str(path).endswith(".clawrtc/config.json") + assert path.parts[-2:] == (".clawrtc", "config.json"), f"Expected .../.clawrtc/config.json, got {path}" def test_custom_path(self): path = get_config_path("/tmp/custom.json")