diff options
| author | Mohamed Hegazy <mhegazy@anthropic.com> | 2026-10-20 23:08:23 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-10-20 23:08:23 +0000 |
| commit | fbfd03863903dc281cc5f56ddf8c1ed4e660f69f (patch) | |
| tree | d878a87ea03157e28959ef9472ded5a13f68e351 /plugins | |
| parent | 01c4bf56762d51c6560fd91af4345307cd619a01 (diff) | |
security-guidance: let the path budget test hold on Windowsmhegazy/sg-stop-pathspec
The expected budget is the platform figure where that is lower than half
of what the environment leaves.
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/security-guidance/tests/test_stop_review_paths.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/security-guidance/tests/test_stop_review_paths.py b/plugins/security-guidance/tests/test_stop_review_paths.py index 8e3b5466..b6f9793c 100644 --- a/plugins/security-guidance/tests/test_stop_review_paths.py +++ b/plugins/security-guidance/tests/test_stop_review_paths.py @@ -197,7 +197,9 @@ class TestGetGitDiff: def test_batches_shrink_to_a_lower_system_limit(self, monkeypatch): monkeypatch.setattr(os, "sysconf", lambda name: 100000, raising=False) budget = gitutil._path_args_budget({"A": "b" * 9997}) - assert budget == 45000 + # Half of what the environment leaves, or the platform figure where + # that is lower (Windows). + assert budget == min(45000, gitutil._MAX_PATH_ARGS_BYTES) paths = [f"dir/file_{i}.py" for i in range(10000)] assert all(sum(len(p) + 9 for p in b) <= budget for b in gitutil._path_batches(paths, budget)) |
