~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
"""Every test path selected by ``tests/run_all_tests.py`` must still exist.
The runner hardcodes its unit-profile selection as string literals. When a
selected module is deleted or renamed, nothing notices until someone runs the
profile and pytest exits 4 ("file or directory not found") — which is how
``tests/test_google_pse.py`` stayed in the ``unit-only``/``ci``/``fast``/
``standard`` profiles for months after #4275 deleted it (#6304).
These guards run inside the unit profile itself, so the runner now checks its
own selection on every run.
"""
# allow: no-sut-import — a guardian over the test runner's own configuration,
# not over application behaviour.
import re
from pathlib import Path
import pytest
from tests import run_all_tests
PROJECT_ROOT = Path(run_all_tests.__file__).parent.parent
def _unit_test_argv(monkeypatch) -> list[str]:
"""Capture the argv ``run_unit_tests()`` would hand to pytest."""
captured: list[str] = []
# pdm need not be installed to check which paths the runner selects.
monkeypatch.setattr(run_all_tests, "find_exe", lambda name: Path(name))
def fake_run_command(cmd, name, **kwargs):
captured.extend(str(c) for c in cmd)
return True
runner = run_all_tests.TestRunner()
monkeypatch.setattr(runner, "run_command", fake_run_command)
assert runner.run_unit_tests() is True
return captured
def test_unit_profile_targets_exist(monkeypatch):
"""No selected path may be missing — pytest exits 4 on the first one."""
targets = [
arg for arg in _unit_test_argv(monkeypatch) if arg.startswith("tests/")
]
assert targets, "run_unit_tests() selected no test paths at all"
missing = [t for t in targets if not (PROJECT_ROOT / t).exists()]
assert not missing, f"run_unit_tests() selects nonexistent paths: {missing}"
def test_unit_profile_still_covers_google_pse(monkeypatch):
"""#6304: the fix must not degrade into dropping the coverage."""
targets = _unit_test_argv(monkeypatch)
assert [t for t in targets if "google_pse" in t], (
"run_unit_tests() no longer selects any Google PSE test module"
)
@pytest.mark.parametrize(
"target",
sorted(
set(
re.findall(
r'"(tests/[^"*?\s]+)"',
Path(run_all_tests.__file__).read_text(encoding="utf-8"),
)
)
),
)
def test_every_runner_path_literal_exists(target):
"""Also cover the profiles that cannot run without a live server."""
assert (PROJECT_ROOT / target).exists(), (
f"run_all_tests.py references {target!r}, which does not exist"
)