2026-06-22 01:31:45 +02:00
|
|
|
"""The toolchain-match subsystem is gated by a default-off flag."""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-06-22 01:59:41 +02:00
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
|
2026-06-22 01:31:45 +02:00
|
|
|
from roboco.config import Settings
|
|
|
|
|
|
2026-06-22 01:59:41 +02:00
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
import pytest
|
|
|
|
|
|
2026-06-22 01:31:45 +02:00
|
|
|
|
|
|
|
|
def test_toolchain_match_disabled_by_default() -> None:
|
|
|
|
|
assert Settings().toolchain_match_enabled is False
|
|
|
|
|
|
|
|
|
|
|
2026-06-22 01:59:41 +02:00
|
|
|
def test_toolchain_match_reads_env(monkeypatch: pytest.MonkeyPatch) -> None:
|
2026-06-22 01:31:45 +02:00
|
|
|
monkeypatch.setenv("ROBOCO_TOOLCHAIN_MATCH_ENABLED", "true")
|
|
|
|
|
assert Settings().toolchain_match_enabled is True
|