fix(vision): aggancia i test alla suite di default, skip pulito su 3.11
testpaths include src/vision/tests: prima uv run pytest (365 test) non ci passava mai. Niente conftest.py: un pytest.importorskip a livello di modulo in conftest.py rompe l'intera sessione, perche' Skipped eredita da BaseException e _importconftest cattura solo Exception (verificato con traceback, provato sia su src/vision/tests sia su src/vision come radice). La guardia sta invece in cima a test_runner.py, prima di numpy (assente anch'esso su 3.11) - idioma standard di pytest, cattura pulita a livello di collection. README aggiornato con il comando reale per farli girare.
This commit is contained in:
@@ -1,7 +1,23 @@
|
||||
"""Il runner: grafo più immagine, numeri fuori. Niente HTTP, niente database."""
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
# The vision tree requires Python >=3.13 (vs-task/vs-measure/vs-pm2d declare it
|
||||
# upstream, see pyproject.toml's `vision` extra), while backend and frontend
|
||||
# stay on 3.11. This must run before `import numpy` - numpy itself is only
|
||||
# installed alongside the vision extra - so that `uv run pytest` on the
|
||||
# default 3.11 environment reports this module as skipped, with a reason,
|
||||
# instead of erroring out of the whole collection.
|
||||
pytest.importorskip(
|
||||
"visionsuite.task",
|
||||
reason=(
|
||||
"the vision tree requires Python >=3.13 (vs-task/vs-measure/vs-pm2d "
|
||||
"declare it upstream); run it with "
|
||||
"`uv run --python 3.13 --extra vision --extra dev pytest src/vision/tests`"
|
||||
),
|
||||
)
|
||||
|
||||
import numpy as np
|
||||
|
||||
from src.vision.runner import RunOutcome, engine_version, run_graph
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user