From e470131a778817ca5ee71d13431048251567a6c9 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Sun, 19 Dec 2021 11:31:38 -0800 Subject: Tests: remove test_get_stage_root_in_spack since it writes to the spack directory (#28056) --- lib/spack/spack/test/stage.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'lib') 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): -- cgit v1.2.3-60-g2f50