diff options
-rw-r--r-- | lib/spack/spack/test/cmd/install.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py index 55bc4a5a27..4c6c0860aa 100644 --- a/lib/spack/spack/test/cmd/install.py +++ b/lib/spack/spack/test/cmd/install.py @@ -678,11 +678,12 @@ def test_install_help_cdash(capsys): @pytest.mark.disable_clean_stage_check def test_cdash_auth_token(tmpdir, install_mockery, capfd): # capfd interferes with Spack's capturing - with capfd.disabled(): - os.environ['SPACK_CDASH_AUTH_TOKEN'] = 'asdf' - out = install( - '-v', - '--log-file=cdash_reports', - '--log-format=cdash', - 'a') - assert 'Using CDash auth token from environment' in out + with tmpdir.as_cwd(): + with capfd.disabled(): + os.environ['SPACK_CDASH_AUTH_TOKEN'] = 'asdf' + out = install( + '-v', + '--log-file=cdash_reports', + '--log-format=cdash', + 'a') + assert 'Using CDash auth token from environment' in out |