| """ | |
| ζΉιθΏθ‘ζζζ΅θ― | |
| """ | |
| import unittest | |
| import sys | |
| import os | |
| sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| def run_unit_tests(): | |
| """θΏθ‘εε ζ΅θ―""" | |
| print("=== θΏθ‘εε ζ΅θ― ===") | |
| loader = unittest.TestLoader() | |
| suite = loader.discover('tests/unit', pattern='test_*.py') | |
| runner = unittest.TextTestRunner(verbosity=2) | |
| result = runner.run(suite) | |
| return result.wasSuccessful() | |
| def run_integration_tests(): | |
| """θΏθ‘ιζζ΅θ―""" | |
| print("\n=== θΏθ‘ιζζ΅θ― ===") | |
| loader = unittest.TestLoader() | |
| suite = loader.discover('tests/integration', pattern='test_*.py') | |
| runner = unittest.TextTestRunner(verbosity=2) | |
| result = runner.run(suite) | |
| return result.wasSuccessful() | |
| def run_all_tests(): | |
| """θΏθ‘ζζζ΅θ―""" | |
| print("Human-Clone η³»η»ζ΅θ―ε₯δ»Ά") | |
| print("=" * 50) | |
| unit_success = run_unit_tests() | |
| integration_success = run_integration_tests() | |
| print("\n=== ζ΅θ―η»ζζ±ζ» ===") | |
| print(f"εε ζ΅θ―: {'β ιθΏ' if unit_success else 'β ε€±θ΄₯'}") | |
| print(f"ιζζ΅θ―: {'β ιθΏ' if integration_success else 'β ε€±θ΄₯'}") | |
| if unit_success and integration_success: | |
| print("π ζζζ΅θ―ιθΏ!") | |
| return True | |
| else: | |
| print("β εε¨ζ΅θ―ε€±θ΄₯") | |
| return False | |
| if __name__ == "__main__": | |
| success = run_all_tests() | |
| sys.exit(0 if success else 1) |