Use tmpdir for all mutable env paths
This commit is contained in:
parent
a35d2f39af
commit
93760847e8
@ -1539,10 +1539,10 @@ def get_rev():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def mutable_mock_env_path(tmpdir_factory, mutable_config):
|
def mutable_mock_env_path(tmpdir, mutable_config):
|
||||||
"""Fixture for mocking the internal spack environments directory."""
|
"""Fixture for mocking the internal spack environments directory."""
|
||||||
saved_path = ev.environment.default_env_path
|
saved_path = ev.environment.default_env_path
|
||||||
mock_path = tmpdir_factory.mktemp("mock-env-path")
|
mock_path = tmpdir.join("mock-env-path")
|
||||||
ev.environment.default_env_path = str(mock_path)
|
ev.environment.default_env_path = str(mock_path)
|
||||||
yield mock_path
|
yield mock_path
|
||||||
ev.environment.default_env_path = saved_path
|
ev.environment.default_env_path = saved_path
|
||||||
|
Loading…
Reference in New Issue
Block a user