diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2023-11-29 14:06:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 14:06:41 +0100 |
commit | c06f353f558c746e87112f6cae7d6ae4857da14a (patch) | |
tree | d8ddc0f7511d82adbbb079e63a8bd9e196e94c80 | |
parent | 367ca3f0ec1f5b01059e7cd9bf60d394bdb1773c (diff) | |
download | spack-c06f353f558c746e87112f6cae7d6ae4857da14a.tar.gz spack-c06f353f558c746e87112f6cae7d6ae4857da14a.tar.bz2 spack-c06f353f558c746e87112f6cae7d6ae4857da14a.tar.xz spack-c06f353f558c746e87112f6cae7d6ae4857da14a.zip |
Simplify _create_mock_configuration_scopes (#41318)
-rw-r--r-- | lib/spack/spack/test/conftest.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index fb7608a56b..6cf4d7375a 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -720,13 +720,13 @@ def configuration_dir(tmpdir_factory, linux_os): def _create_mock_configuration_scopes(configuration_dir): """Create the configuration scopes used in `config` and `mutable_config`.""" - scopes = [spack.config.InternalConfigScope("_builtin", spack.config.CONFIG_DEFAULTS)] - scopes += [ - spack.config.ConfigScope(name, str(configuration_dir.join(name))) - for name in ["site", "system", "user"] + return [ + spack.config.InternalConfigScope("_builtin", spack.config.CONFIG_DEFAULTS), + spack.config.ConfigScope("site", str(configuration_dir.join("site"))), + spack.config.ConfigScope("system", str(configuration_dir.join("system"))), + spack.config.ConfigScope("user", str(configuration_dir.join("user"))), + spack.config.InternalConfigScope("command_line"), ] - scopes += [spack.config.InternalConfigScope("command_line")] - return scopes @pytest.fixture(scope="session") |