Skip to content

Commit 1ec7f0e

Browse files
committed
test: pin the orphan policy contract for solved plans
Component tests for the graph-integrity check from the previous commit. Test-only; no production code changes. Six tests in ``tests/component/test_graph_integrity.py``: - ``test_solve_conda_accepts_pip_via_python_add_pip_dependency``: the *normal* shape. ``python.depends == ["pip"]`` makes ``pip`` forward-reachable; ``pip`` inherits ``python``'s requested category without rescue. - ``test_solve_conda_hard_fails_when_python_metadata_omits_pip``: the abnormal-metadata shape. ``python.depends == []`` makes ``pip`` unreachable; the orphan check hard-fails. The test docstring names this as broken solver metadata, not normal solver auto-install behavior. - ``test_solve_conda_envvar_demotes_orphan_to_warning``: pins ``CONDA_LOCK_ALLOW_ORPHANED_LOCKFILE=1`` semantics. WARNING fires (explicitly mentioning ``main``, ``--dev-dependencies`` / ``-e <category>``, and the envvar name so the message can't silently weaken), orphans are assigned to ``main``, ``solve_conda`` returns instead of raising. - ``test_solve_conda_hard_fails_on_unrecoverable_orphan``: the classic conda#896-corrupt-cache shape -- ``zlib`` planned with empty depends, no categorized package transitively requires it -- hard-fails with regenerate-from-sources guidance and the envvar escape named in the error message. - ``test_solve_conda_orphan_via_dep_breakage_still_hard_fails``: multi-category corrupt-cache variant. - ``test_solve_conda_passes_when_dependency_graph_is_intact``: positive sanity check.
1 parent b9f4475 commit 1ec7f0e

1 file changed

Lines changed: 466 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)