MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / _run_workflow_tests

Method _run_workflow_tests

scripts/test-suite-runner.py:196–238  ·  view source on GitHub ↗

Run workflow-specific tests.

(self)

Source from the content-addressed store, hash-verified

194 return False
195
196 def _run_workflow_tests(self) -> bool:
197 """Run workflow-specific tests."""
198 print("Running Workflow Tests...")
199
200 workflow_tester_script = self.root_path / "scripts" / "workflow-tester.py"
201
202 if not workflow_tester_script.exists():
203 print("[ERROR] Workflow tester script not found")
204 return False
205
206 if not self.repo_owner or not self.repo_name:
207 print("[WARN] Could not detect repository info - skipping workflow tests")
208 return True
209
210 if not self.github_token:
211 print("[WARN] No GitHub token provided - skipping API-dependent workflow tests")
212 return True
213
214 try:
215 result = subprocess.run(
216 [sys.executable, str(workflow_tester_script), "--repo-owner", self.repo_owner, "--repo-name", self.repo_name, "--github-token", self.github_token, "--root", str(self.root_path)],
217 capture_output=True,
218 text=True,
219 cwd=self.root_path,
220 timeout=900,
221 shell=False,
222 ) # nosec
223
224 print("Workflow Test Output:")
225 print(result.stdout)
226
227 if result.stderr:
228 print("Workflow Test Errors:")
229 print(result.stderr)
230
231 return result.returncode == 0
232
233 except subprocess.TimeoutExpired:
234 print("[ERROR] Workflow tests timed out")
235 return False
236 except Exception as e:
237 print(f"[ERROR] Workflow tests failed: {e}")
238 return False
239
240 def _run_legacy_migration_tests(self) -> bool:
241 """Run legacy migration tests."""

Callers 2

run_test_suiteMethod · 0.95
_run_single_suiteMethod · 0.95

Calls 1

runMethod · 0.80

Tested by

no test coverage detected