forked from Rockachopa/Timmy-time-dashboard
fix: resolve 8 test failures from missing requests stub and wrong python path
- Add `requests` to conftest.py module stubs so patch("requests.post") works
in reward scoring tests without the package installed
- Use sys.executable instead of bare "python" in git safety tests so the
subprocess finds pytest from the venv rather than system python
https://claude.ai/code/session_012Ye9nyFEiw2QQfx4bZeDmn
This commit is contained in:
@@ -33,6 +33,9 @@ for _mod in [
|
||||
# pyzbar is optional (for QR code invite detection)
|
||||
"pyzbar",
|
||||
"pyzbar.pyzbar",
|
||||
# requests is optional — used by reward scoring (swarm.learner) to call
|
||||
# Ollama directly; stub so patch("requests.post") works in tests.
|
||||
"requests",
|
||||
]:
|
||||
sys.modules.setdefault(_mod, MagicMock())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user