fix dash test runner
This commit is contained in:
@@ -6,6 +6,7 @@ constructed without an explicit ``repo_root``.
|
||||
"""
|
||||
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
@@ -16,7 +17,7 @@ import pytest
|
||||
from meshnet_tracker.accounts import AccountStore
|
||||
from meshnet_tracker.server import TrackerServer
|
||||
from meshnet_tracker.test_runner import TestRunManager as RunManager
|
||||
from meshnet_tracker.test_runner import discover_repo_root
|
||||
from meshnet_tracker.test_runner import _test_python, discover_repo_root
|
||||
|
||||
|
||||
def _make_repo(tmp_path: Path) -> Path:
|
||||
@@ -119,6 +120,16 @@ def test_enable_flag_constructs_runner_against_real_repo(monkeypatch):
|
||||
assert (tracker._test_runner.repo_root / "tests" / "conftest.py").is_file()
|
||||
|
||||
|
||||
def test_runner_uses_configured_project_python(monkeypatch, tmp_path):
|
||||
python = tmp_path / "python"
|
||||
python.touch(mode=0o755)
|
||||
monkeypatch.setenv("MESHNET_PYTHON", str(python))
|
||||
assert _test_python() == str(python)
|
||||
|
||||
monkeypatch.setenv("MESHNET_PYTHON", str(tmp_path / "missing-python"))
|
||||
assert _test_python() == sys.executable
|
||||
|
||||
|
||||
def test_collection_lists_tests_and_excludes_real_inference(tmp_path, monkeypatch):
|
||||
monkeypatch.delenv("MESHNET_ENABLE_REAL_INFERENCE_TESTS", raising=False)
|
||||
tracker, port, admin, _user = _start_tracker(tmp_path)
|
||||
|
||||
Reference in New Issue
Block a user