Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2d72ff

Browse files
committed
Simplify patched PATH env var construction
This also makes the xfail marking for Windows correct.
1 parent 9151c38 commit c2d72ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/test_git.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,7 @@ def test_successful_refresh_in_default_scenario_invalidates_cached_version(self)
623623
stack.enter_context(_rollback_refresh())
624624
path1 = Path(stack.enter_context(_fake_git(11, 111, 1)))
625625
path2 = Path(stack.enter_context(_fake_git(22, 222, 2)))
626-
sep = os.pathsep
627-
new_path_var = f"{path1.parent}{sep}{path2.parent}{sep}{os.environ['PATH']}"
626+
new_path_var = f"{path1.parent}{os.pathsep}{path2.parent}"
628627
stack.enter_context(mock.patch.dict(os.environ, {"PATH": new_path_var}))
629628
stack.enter_context(_patch_out_env("GIT_PYTHON_GIT_EXECUTABLE"))
630629
new_git = Git()

0 commit comments

Comments
 (0)