MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / run_test_file

Function run_test_file

tests/run_tests.py:18–39  ·  view source on GitHub ↗

Run a single test file and return success status.

(test_file)

Source from the content-addressed store, hash-verified

16sys.path.insert(0, str(project_root))
17
18def run_test_file(test_file):
19 """Run a single test file and return success status."""
20 print(f"\n🧪 Running {test_file}...")
21 try:
22 result = subprocess.run([sys.executable, str(test_file)],
23 capture_output=True, text=True, cwd=project_root)
24
25 if result.returncode == 0:
26 print(f"✅ {test_file.name} - PASSED")
27 if result.stdout:
28 print(f"📄 Output:\n{result.stdout}")
29 return True
30 else:
31 print(f"❌ {test_file.name} - FAILED")
32 if result.stderr:
33 print(f"💥 Error:\n{result.stderr}")
34 if result.stdout:
35 print(f"📄 Output:\n{result.stdout}")
36 return False
37 except Exception as e:
38 print(f"💥 {test_file.name} - ERROR: {e}")
39 return False
40
41def run_tests(test_dirs):
42 """Run all tests in the specified directories."""

Callers 1

run_testsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected