Set up a temp dir with .git and .code-review-graph, seed data, build flows.
(self)
| 659 | """Tests for flow-related MCP tool functions.""" |
| 660 | |
| 661 | def setup_method(self): |
| 662 | """Set up a temp dir with .git and .code-review-graph, seed data, build flows.""" |
| 663 | self.tmp_dir = tempfile.mkdtemp() |
| 664 | # Resolve symlinks (macOS /var -> /private/var) so paths match |
| 665 | # what _validate_repo_root returns via Path.resolve(). |
| 666 | self.root = Path(self.tmp_dir).resolve() |
| 667 | |
| 668 | # Create markers so _validate_repo_root accepts this directory |
| 669 | (self.root / ".git").mkdir() |
| 670 | (self.root / ".code-review-graph").mkdir() |
| 671 | |
| 672 | db_path = str(self.root / ".code-review-graph" / "graph.db") |
| 673 | self.store = GraphStore(db_path) |
| 674 | self._seed_data() |
| 675 | self._build_flows() |
| 676 | |
| 677 | def teardown_method(self): |
| 678 | self.store.close() |
nothing calls this directly
no test coverage detected