hermes-agent/tests/scripts/test_smoke_nemo_relay_shared_metrics.py
teknium1 524c38a98a test: purge low-value tests, lane py16 (624 removed)
Change-detectors, tautologies, source-reading tests, redundant duplicates,
mock-echo tests and dead/unrunnable tests. Per-test rationale in the lane
ledger (category + reason for every removal).
2026-09-23 03:15:26 -07:00

34 lines
922 B
Python

"""Tests for the shared-metrics smoke artifact."""
from pathlib import Path
import pytest
from scripts import smoke_nemo_relay_shared_metrics as smoke
@pytest.mark.parametrize(
"relative_path",
[
Path(".venv") / "bin" / "hermes",
Path(".venv") / "Scripts" / "hermes.exe",
],
)
def test_resolve_hermes_executable_from_repository_venv(
tmp_path,
monkeypatch,
relative_path,
):
executable = tmp_path / relative_path
executable.parent.mkdir(parents=True)
executable.touch()
monkeypatch.setattr(smoke.shutil, "which", lambda _name: None)
assert smoke._resolve_hermes_executable(tmp_path) == executable
def test_resolve_hermes_executable_reports_missing_binary(tmp_path, monkeypatch):
monkeypatch.setattr(smoke.shutil, "which", lambda _name: None)
with pytest.raises(SystemExit, match="or on PATH"):
smoke._resolve_hermes_executable(tmp_path)