-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_phase2_integration.py
More file actions
51 lines (45 loc) · 1.68 KB
/
test_phase2_integration.py
File metadata and controls
51 lines (45 loc) · 1.68 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env python3
"""Test Phase 2: Coordinator Integration with Enhanced Bounce Strategy"""
import sys
from strategies.strategy_coop import StrategyCoordinator
def test_initialization():
"""Test that coordinator initializes with bounce strategy"""
try:
coord = StrategyCoordinator(
enable_bounce_strategy=True,
bounce_risk_profile='moderate'
)
print('✓ StrategyCoordinator initialized with bounce strategy')
print(f' - Bounce strategy available: {coord.bounce_strategy is not None}')
print(f' - Bounce enabled: {coord.enable_bounce_strategy}')
print(f' - Bounce risk profile: {coord.bounce_risk_profile}')
return True
except Exception as e:
print(f'✗ Failed to initialize: {e}')
import traceback
traceback.print_exc()
return False
def test_disabled_mode():
"""Test that coordinator works with bounce disabled"""
try:
coord = StrategyCoordinator(
enable_bounce_strategy=False
)
print('\n✓ StrategyCoordinator works with bounce disabled')
print(f' - Bounce enabled: {coord.enable_bounce_strategy}')
return True
except Exception as e:
print(f'\n✗ Failed with bounce disabled: {e}')
return False
if __name__ == '__main__':
print('Phase 2 Integration Test\n' + '='*50)
success = True
success = test_initialization() and success
success = test_disabled_mode() and success
print('\n' + '='*50)
if success:
print('✓ All tests passed - Phase 2 integration complete!')
sys.exit(0)
else:
print('✗ Some tests failed')
sys.exit(1)