MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / run_tests

Function run_tests

tests/test_auth_rotation_fixes.py:324–366  ·  view source on GitHub ↗

Run all tests and provide summary

()

Source from the content-addressed store, hash-verified

322
323
324def run_tests():
325 """Run all tests and provide summary"""
326 print("Authentication Rotation Fixes - Test Suite")
327 print("=" * 60)
328
329 test_classes = [
330 TestRaceConditionFix,
331 TestRotationLogging,
332 TestDynamicTimeout,
333 TestStopTheWorldProtocol,
334 TestAuthRotationLogic,
335 TestIntegrationScenarios,
336 ]
337
338 total_tests = 0
339 passed_tests = 0
340
341 for test_class in test_classes:
342 print(f"\nRunning {test_class.__name__}...")
343 suite = unittest.TestLoader().loadTestsFromTestCase(test_class)
344 result = unittest.TextTestRunner(verbosity=1).run(suite)
345
346 total_tests += result.testsRun
347 passed_tests += result.testsRun - len(result.failures) - len(result.errors)
348
349 if result.failures:
350 print(f" Failures: {len(result.failures)}")
351 if result.errors:
352 print(f" Errors: {len(result.errors)}")
353
354 print("\n" + "=" * 60)
355 print("Test Summary:")
356 print(f" Total Tests: {total_tests}")
357 print(f" Passed: {passed_tests}")
358
359 if passed_tests == total_tests:
360 print(
361 "\nAll tests passed! Authentication rotation fixes are working correctly."
362 )
363 else:
364 print("\nSome tests failed. Review the implementation.")
365
366 return passed_tests == total_tests
367
368
369if __name__ == "__main__":

Callers 1

Calls 1

runMethod · 0.45

Tested by

no test coverage detected