Spaces:
Sleeping
Sleeping
File size: 1,029 Bytes
565a379 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
from app.core.orchestrator import Orchestrator
def test_routing():
orch = Orchestrator()
# Test cases
queries = [
("calculate 2+2", True), # Simple
("solve x+5=10", True), # Simple
("what is the probability of drawing a red card?", False), # Complex (Probability)
("integrate x^2", False), # Complex (Calculus)
("calculate the sum of limits", False) # Complex (Limit)
]
print("--- Verifying Routing Logic ---")
all_passed = True
for q, expected_simple in queries:
is_simple = orch._is_simple_problem(q)
status = "✅" if is_simple == expected_simple else "❌"
if not is_simple == expected_simple:
all_passed = False
print(f"{status} Query: '{q}' -> Is Simple? {is_simple} (Expected: {expected_simple})")
if all_passed:
print("\n✅ All routing checks passed!")
else:
print("\n❌ Use verify_routing.py to debug failures.")
if __name__ == "__main__":
test_routing()
|