Skip to content

Commit a3cc0ce

Browse files
committed
test(agent): delete the hand-rolled run_all_tests runner
It listed TestAgentLogging, TestCreateAgentsFromYaml and TestAgentBenchmark, none of which exist, so ruff failed with three F821 errors and the runner would have raised NameError if anyone invoked it. It also duplicated pytest for a file pytest already collects. Master has already dropped it.
1 parent 00c320f commit a3cc0ce

1 file changed

Lines changed: 0 additions & 69 deletions

File tree

tests/structs/test_agent.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,75 +1466,6 @@ def test_rollback_also_rewinds_memory_md(self, tmp_path):
14661466
# ============================================================================
14671467

14681468

1469-
def run_all_tests():
1470-
"""Run all test functions"""
1471-
print("Starting Merged Agent Test Suite...\n")
1472-
1473-
# Test classes to run
1474-
test_classes = [
1475-
TestBasicAgent,
1476-
TestAgentFeatures,
1477-
TestAgentLogging,
1478-
TestCreateAgentsFromYaml,
1479-
TestAgentBenchmark,
1480-
TestAgentToolUsage,
1481-
TestLLMArgsAndHandling,
1482-
]
1483-
1484-
total_tests = 0
1485-
passed_tests = 0
1486-
failed_tests = 0
1487-
1488-
for test_class in test_classes:
1489-
print(f"\n{'='*50}")
1490-
print(f"Running {test_class.__name__}")
1491-
print(f"{'='*50}")
1492-
1493-
# Create test instance
1494-
test_instance = test_class()
1495-
1496-
# Get all test methods
1497-
test_methods = [
1498-
method
1499-
for method in dir(test_instance)
1500-
if method.startswith("test_")
1501-
]
1502-
1503-
for test_method in test_methods:
1504-
total_tests += 1
1505-
try:
1506-
# Run the test method
1507-
getattr(test_instance, test_method)()
1508-
passed_tests += 1
1509-
print(f"✓ {test_method}")
1510-
except Exception as e:
1511-
failed_tests += 1
1512-
print(f"✗ {test_method}: {str(e)}")
1513-
1514-
# Print summary
1515-
print(f"\n{'='*50}")
1516-
print("Test Summary")
1517-
print(f"{'='*50}")
1518-
print(f"Total Tests: {total_tests}")
1519-
print(f"Passed: {passed_tests}")
1520-
print(f"Failed: {failed_tests}")
1521-
print(f"Success Rate: {(passed_tests/total_tests)*100:.2f}%")
1522-
1523-
return {
1524-
"total": total_tests,
1525-
"passed": passed_tests,
1526-
"failed": failed_tests,
1527-
"success_rate": (passed_tests / total_tests) * 100,
1528-
}
1529-
1530-
1531-
if __name__ == "__main__":
1532-
# Run all tests
1533-
results = run_all_tests()
1534-
1535-
print(results)
1536-
1537-
15381469
# ============================================================================
15391470
# arun forwarding and error path (#1853 item 3)
15401471
# ============================================================================

0 commit comments

Comments
 (0)