-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_wizard_startup.py
More file actions
62 lines (49 loc) · 1.6 KB
/
Copy pathtest_wizard_startup.py
File metadata and controls
62 lines (49 loc) · 1.6 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
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python3
"""
Test the wizard startup by running it briefly
"""
import sys
import asyncio
from pathlib import Path
# Add wizard to path
sys.path.insert(0, str(Path(__file__).parent))
async def test_wizard_startup():
"""Test that the wizard can start and initialize properly"""
try:
from wizard.app import BsubWizardApp
print("Creating BSub Wizard app...")
app = BsubWizardApp()
print("Starting app briefly...")
# Run the app for a very short time to test initialization
await app._startup()
print("✓ App startup completed successfully")
# Test that we can access the initial screen
print("✓ App initialized without errors")
await app._shutdown()
print("✓ App shutdown completed successfully")
return True
except Exception as e:
print(f"❌ Wizard startup failed: {e}")
import traceback
traceback.print_exc()
return False
def main():
"""Run the startup test"""
print("=" * 50)
print("BSub Wizard Startup Test")
print("=" * 50)
try:
result = asyncio.run(test_wizard_startup())
if result:
print("\n✅ Wizard startup test passed!")
print("\nTo run the full wizard:")
print(" pixi run start")
else:
print("\n❌ Wizard startup test failed!")
return 1
except Exception as e:
print(f"\n❌ Test execution failed: {e}")
return 1
return 0
if __name__ == "__main__":
sys.exit(main())