Update lib/spack/spack/test/cmd/build_env.py

This commit is contained in:
psakievich 2024-12-17 15:47:28 -07:00 committed by GitHub
parent b68b5811b8
commit 2cae2d0f27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,7 @@ def test_pickle(tmpdir):
@pytest.mark.usefixtures("config", "mock_packages", "working_env")
def test_cd(cd_key, tmpdir, monkeypatch, capfd):
"""test that a subshell will navigate using spack cd before running commands"""
cmd = "pwd" if sys.platform != "win32" else 'powershell.exe -Command "& {(Get-Location).Path}'
cmd = "pwd" if sys.platform != "win32" else 'powershell.exe -Command "& {(Get-Location).Path}"'
def mock_execvp(_, args):
"""os.execvp will kill take over the pytest process when it is successful"""