Official Codebase of 3DCodeVerse
Python
ci: run every offline test directory, not 7 of 24 (D39)
ziyao3e910f42935c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 6ecb81ca..1b61e0c2 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -10,6 +10,7 @@ jobs:lint:name: ruff (harness)runs-on: ubuntu-latest+ timeout-minutes: 10steps:- uses: actions/checkout@v4- uses: actions/setup-python@v5@@ -31,6 +32,7 @@ jobs:# tests/core/test_portability.py — the `node`-marked tests are deselected below.name: offline tests (py${{ matrix.python-version }})runs-on: ubuntu-latest+ timeout-minutes: 40strategy:fail-fast: falsematrix:@@ -45,12 +47,15 @@ jobs:run: pip install -e ./harness[dev]# The suite is marked: `live` needs API keys, `blender` needs a Blender# binary, `node` needs runtime_js/node_modules — none exist on a runner,- # so CI runs the pure-python subset: 1290 selected of 1306, 1284 passed- # on 3.13 locally, out of the 2110 the whole offline suite passes. The- # few skips are data-dependent (recorded runs/batteries a fresh clone- # does not have). Measured with NO credentials in the environment,- # which is what a runner has: every non-`live` test must pass without- # keys (PORT-2).+ # so CI runs EVERY test directory with those three markers deselected.+ # (Until 2026-08-25 the command listed 7 of the 24 test directories, so+ # 828 pure-python tests — including every docs-vs-code drift guard under+ # tests/install and tests/docs_html — never ran on a PR.) Optional-dep+ # tests importorskip cleanly on a [dev]-only install. Measured 2026-08-25+ # on py3.11 with Blender + node present: 2256 passed of the whole offline+ # suite; the pure-python expression below leaves 2137 selected. Measured+ # with NO credentials in the environment, which is what a runner has:+ # every non-`live` test must pass without keys (PORT-2).- name: pytest (pure python subset)- run: python -m pytest tests/core tests/models tests/judges tests/orchestrator_tracks tests/flywheel_cli tests/bench_prompts tests/cost -q -m "not live and not blender and not node"+ run: python -m pytest tests -q -m "not live and not blender and not node"working-directory: harnessdiff --git a/.gitignore b/.gitignoreindex 2bd28ba2..14b0134d 100644--- a/.gitignore+++ b/.gitignore@@ -17,3 +17,5 @@ harness/logs/*.logbuild/dist/+# in-tree virtualenv (docs/INSTALL.md tells users to create one)+.venv/diff --git a/harness/tests/install/test_docs.py b/harness/tests/install/test_docs.pyindex f213ae18..39e2b872 100644--- a/harness/tests/install/test_docs.py+++ b/harness/tests/install/test_docs.py@@ -239,7 +239,9 @@ def test_doctor_checks_every_module_of_every_optional_extra(monkeypatch) -> Nonemonkeypatch.setattr(importlib, "import_module", no_graphics)_, deps = check_python_deps()- assert deps[1] == "WARN" and "moderngl" in deps[2] and "harness[graphics]" in deps[2]+ # the remedy names [graphics]; on a box that also lacks another extra (CI has no cadquery)+ # the extras merge into one `harness[cad,graphics]` string, which is still correct+ assert deps[1] == "WARN" and "moderngl" in deps[2] and re.search(r"harness\[[^\]]*\bgraphics\b", deps[2]), deps[2]# and the whole base install — every extra absent, which is what `pip install -e harness`# leaves behind — is a WARN whose remedy names EVERY missing extra, never a FAILdiff --git a/harness/tests/prompts/test_snippets_run.py b/harness/tests/prompts/test_snippets_run.pyindex 2e60733d..cccf342b 100644--- a/harness/tests/prompts/test_snippets_run.py+++ b/harness/tests/prompts/test_snippets_run.py@@ -44,7 +44,7 @@ def test_cadquery_cookbook_runs() -> None:def test_cadquery_contract_example_runs() -> None:- import cadquery as cq # noqa: F401+ pytest.importorskip("cadquery") # the [cad] extra — absent on a [dev]-only install (CI)ns = _exec_python_blocks("cadquery/contract.md")result = ns["result"]