MCPcopy Index your code
hub / github.com/tirth8205/code-review-graph / setup_method

Method setup_method

tests/test_tools.py:870–882  ·  view source on GitHub ↗

Set up a temp dir with .git and .code-review-graph, seed clustered graph.

(self)

Source from the content-addressed store, hash-verified

868 """Tests for community-related MCP tool functions."""
869
870 def setup_method(self):
871 """Set up a temp dir with .git and .code-review-graph, seed clustered graph."""
872 self.tmp_dir = tempfile.mkdtemp()
873 self.root = Path(self.tmp_dir).resolve()
874
875 # Create markers so _validate_repo_root accepts this directory
876 (self.root / ".git").mkdir()
877 (self.root / ".code-review-graph").mkdir()
878
879 db_path = str(self.root / ".code-review-graph" / "graph.db")
880 self.store = GraphStore(db_path)
881 self._seed_data()
882 self._build_communities()
883
884 def teardown_method(self):
885 self.store.close()

Callers

nothing calls this directly

Calls 3

_seed_dataMethod · 0.95
_build_communitiesMethod · 0.95
GraphStoreClass · 0.90

Tested by

no test coverage detected