MCPcopy Create free account
hub / github.com/HKUDS/ClawWork / test_fallback_behavior

Function test_fallback_behavior

scripts/test_task_value_integration.py:72–96  ·  view source on GitHub ↗

Test fallback to default payment when values not available

()

Source from the content-addressed store, hash-verified

70
71
72def test_fallback_behavior():
73 """Test fallback to default payment when values not available"""
74 print("\n" + "="*60)
75 print("TEST 2: Fallback to Default Payment")
76 print("="*60)
77
78 # Initialize without task values path
79 task_manager = TaskManager(
80 task_source_type="parquet",
81 task_source_path="./gdpval",
82 default_max_payment=50.0
83 )
84
85 num_tasks = task_manager.load_tasks()
86 print(f"\n✅ Loaded {num_tasks} tasks (no task values)")
87
88 task = task_manager.select_daily_task(date="2025-01-21")
89
90 if task.get('max_payment') == 50.0:
91 print(f"✅ Uses default payment: ${task['max_payment']:.2f}")
92 else:
93 print(f"❌ Unexpected payment: ${task.get('max_payment')}")
94 return False
95
96 return True
97
98
99def test_evaluator_integration():

Callers

nothing calls this directly

Calls 3

load_tasksMethod · 0.95
select_daily_taskMethod · 0.95
TaskManagerClass · 0.90

Tested by

no test coverage detected