Files
local-deep-research/scripts/dev/debug_pytest.py
LearningCircuit b28c80466c refactor: cleanup remaining verified dead code across 5 areas (#3263)
* refactor: cleanup remaining verified dead code across 5 areas

Dead templates, functions, storage ABCs, eslint duplicate, dev scripts.
All verified by 40 agents (20 scanning + 20 verification).

* revert: keep 3 dev scripts that have active references

- regenerate_golden_master.py: called by pre-commit hook
  .pre-commit-hooks/check-golden-master-settings.py
- restart_server.sh: documented in API testing guide, examples,
  and multiple README files
- run_tests.py: referenced in CONTRIBUTING.md testing section

Added inline comments noting the references so future cleanup
attempts don't remove them without updating dependents.

* revert: keep restart_server_debug.sh dev script

* revert: keep debug_pytest.py and stop_server.sh dev scripts

Small utility scripts that cost nothing to keep and are useful
for developers debugging CI failures and managing the dev server.

* docs: add do-not-remove comments to all dev scripts

Each script now documents why it must be kept:
- regenerate_golden_master.py: pre-commit hook dependency
- restart_server.sh: documented in API guides and examples
- restart_server_debug.sh: companion to restart_server.sh
- run_tests.py: referenced in CONTRIBUTING.md
- debug_pytest.py: developer utility for CI failure reproduction
- stop_server.sh: companion to restart_server.sh
2026-03-28 16:03:21 +01:00

33 lines
749 B
Python

#!/usr/bin/env python3
"""Debug script to run pytest with CI settings and see what's failing.
Do not remove — developer utility for reproducing CI failures locally.
"""
import os
import subprocess
import sys
# Set CI environment to mimic CI behavior
os.environ["CI"] = "true"
os.environ["USE_FALLBACK_LLM"] = "true"
cmd = [
sys.executable,
"run_tests.py",
"-m",
"not slow",
"--ignore=tests/searxng/",
"--ignore=tests/unit/test_config.py",
"--ignore=tests/api_tests/",
"--ignore=tests/health_check/test_endpoints_health.py",
"-v",
"--tb=short",
"--timeout=30",
"-x", # Stop on first failure to debug
]
print(f"Running: {' '.join(cmd)}")
result = subprocess.run(cmd)
sys.exit(result.returncode)