fix(test): v0.53.7 — symlink test accepts either rejection branch

test_load_jsonl_rows_rejects_symlink: when the symlink target is outside
cwd, is_under_cwd's realpath resolution catches it before the lstat check
fires. Both rejections are valid security guards; broaden the regex to
match either error message ("symlink" or "under cwd").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alpamys 2026-05-13 19:55:16 +05:00
parent 9c9f962676
commit a26511f868
1 changed files with 1 additions and 1 deletions

View File

@ -1502,7 +1502,7 @@ class TestReviewFixesDataScore:
link = tmp_path / "link.jsonl"
_os.symlink(str(target_outside), str(link))
from soup_cli.utils.data_score import load_jsonl_rows
with pytest.raises(ValueError, match="symlink"):
with pytest.raises(ValueError, match="symlink|under cwd"):
load_jsonl_rows("link.jsonl")
finally:
if target_outside.exists():