From 2071e2beda763137416ac386d4bb953711ec995d Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 18 Oct 2026 20:28:09 +0200 Subject: test(tools): add test-log judge, docs and policy checks with tests - ciq_test_report.py: decides pass/fail from Run No Evil output instead of monkeydo's unreliable exit code; writes JUnit XML. - check_docs.py: offline check of relative links and GitHub anchors. - lint_project.py: project rules (headers, no logging outside Diag, no secret-like literals, no network APIs or permissions). - check_budgets.py with budgets.json: perf and memory gates. - make_icon.py: reproducible launcher icon. - 31 pytest tests, including Hypothesis fuzzing of the log parser and integration checks against the real docs and sources; ruff and mypy (strict) clean. Co-Authored-By: Claude Opus 5.5 --- tools/tests/conftest.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/tests/conftest.py (limited to 'tools/tests/conftest.py') diff --git a/tools/tests/conftest.py b/tools/tests/conftest.py new file mode 100644 index 0000000..7054ecb --- /dev/null +++ b/tools/tests/conftest.py @@ -0,0 +1,25 @@ +"""Shared pytest setup for the tool tests. + +* Makes the modules in tools/ importable as top-level modules. +* Keeps Hypothesis' example database in build/ (git-ignored) and disables its + per-example deadline, which is flaky on a busy machine. +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +from hypothesis import settings +from hypothesis.database import DirectoryBasedExampleDatabase + +TOOLS_DIR = Path(__file__).resolve().parents[1] +PROJECT_ROOT = TOOLS_DIR.parent +sys.path.insert(0, str(TOOLS_DIR)) + +settings.register_profile( + "project", + database=DirectoryBasedExampleDatabase(str(PROJECT_ROOT / "build" / ".hypothesis")), + deadline=None, +) +settings.load_profile("project") -- cgit v1.2.3