From 634232ee5a5328823cf2a5ac4c362d457bd3b99c Mon Sep 17 00:00:00 2001 From: Wolfvin Date: Tue, 14 Jul 2026 18:52:17 +0700 Subject: [PATCH] test(cli): fix doubled scripts/scripts path in check-positional test (refs #271) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used relative 'scripts/codelens.py' + PYTHONPATH='scripts'; under CI's cd-scripts cwd that became scripts/scripts/codelens.py → empty output → assertion failed. Use SCRIPT_DIR (absolute), matching sibling tests. Confirms the 'check' command itself is fine — it was a test path-construction bug. Co-Authored-By: Claude Opus 4.8 --- tests/test_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 83409f36..ef4c8707 100755 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -316,10 +316,10 @@ def test_check_full_cli_invocation_with_positional(self): try: cmd_scan(ws) # build registry so check has something to read proc = subprocess.run( - [sys.executable, "scripts/codelens.py", + [sys.executable, os.path.join(SCRIPT_DIR, "codelens.py"), "check", ws, "--severity", "high", "--format", "json"], capture_output=True, text=True, timeout=60, - env={**os.environ, "PYTHONPATH": "scripts"}, + env={**os.environ, "PYTHONPATH": SCRIPT_DIR}, ) # ``check`` exits 1 when gate fails (which it likely will on the # sample workspace) — that's fine, we only care that argparse