From 34d35451f6149b4caa0b63599dcfee2cea4e64e7 Mon Sep 17 00:00:00 2001 From: faizan-oai <269039902+faizan-oai@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:53:02 -0700 Subject: [PATCH] test(windows): make canonical plugin path fixtures portable --- plugins/codex-security/tests/test_generate_rank_input.py | 1 + plugins/codex-security/tests/test_workbench_target.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/codex-security/tests/test_generate_rank_input.py b/plugins/codex-security/tests/test_generate_rank_input.py index e4101e7dc..359c85c18 100644 --- a/plugins/codex-security/tests/test_generate_rank_input.py +++ b/plugins/codex-security/tests/test_generate_rank_input.py @@ -227,6 +227,7 @@ def test_make_repo_rank_input_preserves_legacy_tilde_scope( (repo / "src").mkdir(parents=True) (repo / "src" / "runtime.py").write_text("runtime = True", encoding="utf-8") monkeypatch.setenv("HOME", str(home)) + monkeypatch.setenv("USERPROFILE", str(home)) output = tmp_path / "rank_input.jsonl" run_cli( diff --git a/plugins/codex-security/tests/test_workbench_target.py b/plugins/codex-security/tests/test_workbench_target.py index 315f8dfce..a4e37753c 100644 --- a/plugins/codex-security/tests/test_workbench_target.py +++ b/plugins/codex-security/tests/test_workbench_target.py @@ -57,9 +57,8 @@ def test_git_output_decodes_repository_paths_as_utf8( initialize_git_repository(target) monkeypatch.setattr(subprocess, "_text_encoding", lambda: encoding) - assert WORKBENCH_TARGET["git_output"](target, "rev-parse", "--show-toplevel") == str( - target - ) + output = WORKBENCH_TARGET["git_output"](target, "rev-parse", "--show-toplevel") + assert Path(output) == target def test_directory_content_digest_uses_git_file_set(tmp_path: Path) -> None: