| """Tests for harness/F package configuration.""" | |
| import importlib | |
| from pathlib import Path | |
| from harness import F | |
| def test_sources_and_default_are_declared(): | |
| assert F.SOURCES == ("perceived",) | |
| assert F.DEFAULT_SOURCE == "perceived" | |
| assert F.RESULTS_DIR == Path("/root/results/F") | |
| def test_results_dir_can_be_overridden_by_environment(monkeypatch, tmp_path): | |
| monkeypatch.setenv("VSI_HARNESS_F_RESULTS_DIR", str(tmp_path / "F")) | |
| reloaded = importlib.reload(F) | |
| assert reloaded.RESULTS_DIR == tmp_path / "F" | |
| monkeypatch.delenv("VSI_HARNESS_F_RESULTS_DIR") | |
| importlib.reload(F) | |