File size: 610 Bytes
e8055cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""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)