Remove spack.config.add_default_platform_scope (#48425)

This function is used only in tests, and pushes a scope to the
current global CONFIG, when on Windows, regardless of what that
CONFIG is.
This commit is contained in:
Massimiliano Culpo 2025-01-06 20:06:02 +01:00 committed by GitHub
parent 2842c6d191
commit 85c125a0f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 11 deletions

View File

@ -951,12 +951,6 @@ def set(path: str, value: Any, scope: Optional[str] = None) -> None:
return CONFIG.set(path, value, scope)
def add_default_platform_scope(platform: str) -> None:
plat_name = os.path.join("defaults", platform)
plat_path = os.path.join(CONFIGURATION_DEFAULTS_PATH[1], platform)
CONFIG.push_scope(DirectoryConfigScope(plat_name, plat_path))
def scopes() -> Dict[str, ConfigScope]:
"""Convenience function to get list of configuration scopes."""
return CONFIG.scopes

View File

@ -635,11 +635,6 @@ def ensure_debug(monkeypatch):
tty.set_debug(current_debug_level)
@pytest.fixture(autouse=sys.platform == "win32", scope="session")
def platform_config():
spack.config.add_default_platform_scope(spack.platforms.real_host().name)
@pytest.fixture
def default_config():
"""Isolates the default configuration from the user configs.