tests.test_dep_graph moduleΒΆ
Tests for repomatic.deps.dep_graph: the Mermaid dependency-graph generator.
- tests.test_dep_graph.test_filter_root_edges_drops_group_package_pulled_in_by_an_extra()[source]ΒΆ
A group package an extra drags in is not a main dependency.
uvβs CycloneDX export hangs
requestsoff the root because thetestgroup declares it, though only thesphinxextra pulls it in. Exporting with no--groupat all still produces that edge.- Return type:
- tests.test_dep_graph.test_filter_root_edges_without_lock_data()[source]ΒΆ
Missing lock data is not evidence that a root edge is spurious.
- Return type:
- tests.test_dep_graph.test_filter_root_edges_with_no_main_dependencies()[source]ΒΆ
A project declaring nothing unconditionally keeps only box-owned edges.
An empty mapping states that much, where
Nonestates nothing at all.- Return type:
- tests.test_dep_graph.test_render_mermaid_after_filtering_root_edges()[source]ΒΆ
The dropped package renders as a transitive oval, outside every box.
- Return type:
- tests.test_dep_graph.test_trim_graph_to_depth(depth, packages, edge_count)[source]ΒΆ
Trimming keeps every node within depth hops of the root, and no more.
- Return type:
- tests.test_dep_graph.test_cyclic_graph_traversals_terminate()[source]ΒΆ
Every graph traversal must terminate on cyclic input.
Without their visited guards,
_compute_node_depthswould loop forever and_compute_subtree_sizeswould recurse infinitely on the apple <-> banana cycle, so reaching the asserts at all proves cycle-safety; the values pin the expected output.- Return type:
- tests.test_dep_graph.test_render_mermaid_with_cycle()[source]ΒΆ
The full render path stays cycle-safe and emits the self-loop edge.
- Return type:
- tests.test_dep_graph.test_render_mermaid_primary_deps_ordering()[source]ΒΆ
Primary deps with larger subtrees should be declared first.
- Return type:
- tests.test_dep_graph.test_render_mermaid_edge_ordering()[source]ΒΆ
Root edges should come before transitive edges.
- Return type:
- tests.test_dep_graph.test_update_dep_graph_disabled_writes_nothing(tmp_path, monkeypatch)[source]ΒΆ
dependency-graph.update = falseexits before reading the lockfile.The directory holds no
uv.lock, so the export would fail: a clean exit with no output file is reachable only through the guard.- Return type: