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

Function run_tests

tests/run_tests.py:41–82  ·  view source on GitHub ↗

Run all tests in the specified directories.

(test_dirs)

Source from the content-addressed store, hash-verified

39 return False
40
41def run_tests(test_dirs):
42 """Run all tests in the specified directories."""
43 total_tests = 0
44 passed_tests = 0
45 failed_tests = []
46
47 for test_dir in test_dirs:
48 test_path = Path(__file__).parent / test_dir
49 if not test_path.exists():
50 print(f"⚠️ Warning: Test directory {test_dir} not found")
51 continue
52
53 test_files = list(test_path.glob("test_*.py"))
54 if not test_files:
55 print(f"⚠️ No test files found in {test_dir}")
56 continue
57
58 print(f"\n📁 Running {test_dir} tests...")
59 for test_file in sorted(test_files):
60 total_tests += 1
61 if run_test_file(test_file):
62 passed_tests += 1
63 else:
64 failed_tests.append(str(test_file))
65
66 # Print summary
67 print(f"\n{'='*50}")
68 print(f"📊 TEST SUMMARY")
69 print(f"{'='*50}")
70 print(f"Total tests: {total_tests}")
71 print(f"Passed: {passed_tests}")
72 print(f"Failed: {len(failed_tests)}")
73
74 if failed_tests:
75 print(f"\n❌ Failed tests:")
76 for test in failed_tests:
77 print(f" - {test}")
78 print(f"\n💡 Tip: Run individual failed tests for more details")
79 return False
80 else:
81 print(f"\n🎉 All tests passed!")
82 return True
83
84def check_environment():
85 """Check if required environment variables and dependencies are available."""

Callers 1

mainFunction · 0.85

Calls 1

run_test_fileFunction · 0.85

Tested by

no test coverage detected