Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill covers patterns for mocking RepoMaps in tests. Trigger: Load this skill when working with test_graph fixtures.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -61% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -55% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -37% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -34% | 0% |
<!-- L1:START -->
This skill covers patterns for mocking RepoMaps in tests.
Trigger: Load this skill when working with test_graph fixtures. <!-- L1:END -->
<!-- L2:START -->
| Task | Pattern | |------|---------| | Create a small graph fixture | small_graph | | Test adding a node | TestAddNode |
<!-- L2:END -->
<!-- L3:START -->
This pattern provides a predefined small graph for testing purposes, allowing for consistent and repeatable tests.
python# Example usage of small_graph from tests.test_graph import small_graph def test_small_graph(): assert len(small_graph.nodes) == expected_node_count
This pattern tests the functionality of adding a node to the graph, ensuring that the graph updates correctly.
python# Example usage of TestAddNode from tests.test_graph import TestAddNode def test_add_node(): test_case = TestAddNode() test_case.run()
bashpytest tests/test_graph.py
Using real RepoMaps can lead to flaky tests and inconsistent results.
python# BAD from repo.maps import RepoMap def test_with_real_repos(): repo = RepoMap() assert repo is not None
<!-- L3:END -->
Other measured skills in the registry, with their headline benchmark lift.