- Smart systray (pystray+plyer) remplace PyQt5 : notifications toast, menu dynamique avec workflows, chat "Que dois-je faire ?", icône colorée - Preflight GPU : check_machine_ready() + @pytest.mark.gpu dans conftest - Correction 63 tests cassés → 0 failed (1200 passed) - Tests VWB obsolètes déplacés vers _a_trier/ - Support qwen3-vl:8b sur GPU (remplace qwen2.5vl:3b) - fix images < 32x32 (Ollama panic) - fix force_json=False (qwen3-vl incompatible) - fix temperature 0.1 (0.0 bloque avec images) - Fix captor Windows : Key.esc, _get_key_name() - Fix LeaServerClient : check_connection, list_workflows format - deploy_windows.py : packaging propre client Windows - VWB : edges visibles (#607d8b) + fitView automatique Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
"""Conftest pour les tests d'intégration."""
|
|
import importlib
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
import requests
|
|
|
|
|
|
def _vwb_backend_available():
|
|
"""Vérifie si le backend VWB est accessible."""
|
|
try:
|
|
resp = requests.get("http://localhost:5002/api/health", timeout=2)
|
|
return resp.ok
|
|
except Exception:
|
|
return False
|
|
|
|
|
|
requires_vwb = pytest.mark.skipif(
|
|
not _vwb_backend_available(),
|
|
reason="VWB backend non disponible (port 5002)",
|
|
)
|
|
|
|
ROOT = str(Path(__file__).resolve().parents[2])
|
|
|
|
# Forcer ROOT en tête de sys.path pour que le agent_v0 local (rpa_vision_v3)
|
|
# soit trouvé AVANT le agent_v0 standalone de ~/ai/
|
|
if ROOT in sys.path:
|
|
sys.path.remove(ROOT)
|
|
sys.path.insert(0, ROOT)
|
|
|
|
# Si agent_v0 est déjà chargé depuis le mauvais chemin, le remplacer
|
|
_agent_mod = sys.modules.get("agent_v0")
|
|
if _agent_mod and not getattr(_agent_mod, "__file__", "").startswith(ROOT):
|
|
# Supprimer les entrées liées à l'ancien agent_v0
|
|
to_remove = [k for k in sys.modules if k == "agent_v0" or k.startswith("agent_v0.")]
|
|
for k in to_remove:
|
|
del sys.modules[k]
|
|
|
|
# Pré-importer le bon agent_v0.server_v1
|
|
import agent_v0.server_v1 # noqa: F401
|