From bc452a2f25ce53ab2d26b992db63a54e12f67fd8 Mon Sep 17 00:00:00 2001 From: Devin Phillip Davis <354534380+quantum-osiris@users.noreply.github.com> Date: Mon, 9 Nov 2026 14:29:54 -0500 Subject: [PATCH] test(evolution-bridge): fall back to the pinned dnalang ledger when dnalang-core is absent CI has no sibling dnalang-core checkout, so all 8 ledger-writing cases raised FileNotFoundError. Use tests/fixtures/dnalang_ledger_v0_2_0.py, as test_genome_ledger_supersession.py already does. Locally, with LEDGER_SRC pointed at a missing path: 10 passed. Co-Authored-By: Claude Opus 5.5 --- tests/test_evolution_bridge.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_evolution_bridge.py b/tests/test_evolution_bridge.py index cbb55f61..14eee6b5 100644 --- a/tests/test_evolution_bridge.py +++ b/tests/test_evolution_bridge.py @@ -7,6 +7,7 @@ import pytest +import genome_ledger as gl from osiris_cli import grants from osiris_cli.orchestration import evolution_bridge as eb from osiris_cli.orchestration.trio import DeveloperOutput, run_trio, tree_digest @@ -17,6 +18,19 @@ "def test_single():\n assert mean([5]) == 5\n") +# dnalang-core is a separate package; without it, use the pinned copy of its ledger.py +# (v0.2.0) so these cases run everywhere instead of failing (same as test_genome_ledger_supersession). +FIXTURE_LEDGER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures", + "dnalang_ledger_v0_2_0.py") + + +@pytest.fixture(autouse=True) +def _dnalang_ledger_source(monkeypatch): + if not os.path.exists(gl.LEDGER_SRC): + monkeypatch.setattr(gl, "LEDGER_SRC", FIXTURE_LEDGER) + monkeypatch.setattr(gl, "_ledger_mod", None) + + @pytest.fixture def repo(tmp_path): r = tmp_path / "repo"