workspace / tests /test_F /test_F.py
AntonioJun's picture
Replace tests with local workspace contents
e8055cf verified
Raw
History Blame Contribute Delete
610 Bytes
"""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)