summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2021-12-19 11:31:38 -0800
committerGitHub <noreply@github.com>2021-12-19 11:31:38 -0800
commite470131a778817ca5ee71d13431048251567a6c9 (patch)
treef55e8907bbb643a85b3683aa9e3703a20f912946 /lib
parent1e35d06bf0d48deacc77cf1d670bd1c759890310 (diff)
downloadspack-e470131a778817ca5ee71d13431048251567a6c9.tar.gz
spack-e470131a778817ca5ee71d13431048251567a6c9.tar.bz2
spack-e470131a778817ca5ee71d13431048251567a6c9.tar.xz
spack-e470131a778817ca5ee71d13431048251567a6c9.zip
Tests: remove test_get_stage_root_in_spack since it writes to the spack directory (#28056)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/stage.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py
index b337486e7f..0c6292af9d 100644
--- a/lib/spack/spack/test/stage.py
+++ b/lib/spack/spack/test/stage.py
@@ -10,7 +10,6 @@ import getpass
import os
import shutil
import stat
-import tempfile
import pytest
@@ -825,29 +824,6 @@ class TestStage(object):
assert os.path.exists(test_path)
shutil.rmtree(test_path)
- def test_get_stage_root_in_spack(self, clear_stage_root):
- """Ensure an instance path is an accessible build stage path."""
- base = canonicalize_path(os.path.join('$spack', '.spack-test-stage'))
- mkdirp(base)
- test_path = tempfile.mkdtemp(dir=base)
-
- try:
- with spack.config.override('config:build_stage', test_path):
- path = spack.stage.get_stage_root()
-
- assert 'spack' in path.split(os.path.sep)
-
- # Make sure cached stage path value was changed appropriately
- assert spack.stage._stage_root in (
- test_path, os.path.join(test_path, getpass.getuser()))
-
- # Make sure the directory exists
- assert os.path.isdir(spack.stage._stage_root)
-
- finally:
- # Clean up regardless of outcome
- shutil.rmtree(base)
-
def test_stage_constructor_no_fetcher(self):
"""Ensure Stage constructor with no URL or fetch strategy fails."""
with pytest.raises(ValueError):