Skip to content

Commit 2f68af7

Browse files
Add unit tests for bootstrap_graph.py
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 1a5c6bd commit 2f68af7

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

tests/test_bootstrap_graph.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import unittest
2+
from src.bootstrap_graph import BootstrapGraph, build_bootstrap_graph
3+
4+
5+
class TestBootstrapGraph(unittest.TestCase):
6+
def test_as_markdown(self):
7+
graph = BootstrapGraph(stages=("stage A", "stage B", "stage C"))
8+
expected = "# Bootstrap Graph\n\n- stage A\n- stage B\n- stage C"
9+
self.assertEqual(graph.as_markdown(), expected)
10+
11+
def test_build_bootstrap_graph(self):
12+
graph = build_bootstrap_graph()
13+
self.assertIsInstance(graph, BootstrapGraph)
14+
15+
expected_stages = (
16+
"top-level prefetch side effects",
17+
"warning handler and environment guards",
18+
"CLI parser and pre-action trust gate",
19+
"setup() + commands/agents parallel load",
20+
"deferred init after trust",
21+
"mode routing: local / remote / ssh / teleport / direct-connect / deep-link",
22+
"query engine submit loop",
23+
)
24+
25+
self.assertEqual(graph.stages, expected_stages)
26+
27+
28+
if __name__ == "__main__":
29+
unittest.main()

0 commit comments

Comments
 (0)