-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_driver_check.py
More file actions
66 lines (55 loc) · 1.83 KB
/
debug_driver_check.py
File metadata and controls
66 lines (55 loc) · 1.83 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
63
64
65
66
"""
Debug Script - Check if ResponsiveWindowsDriver is Actually Running
"""
import sys
import os
# Add project root
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
print("=" * 70)
print("RESPONSIVE DRIVER DEBUG CHECK")
print("=" * 70)
# Test 1: Can we import the driver?
print("\n1. Testing Driver Import...")
try:
from drivers.responsive_windows_driver import ResponsiveWindowsDriver
print(" ✅ ResponsiveWindowsDriver imported successfully")
except ImportError as e:
print(f" ❌ FAILED to import: {e}")
print(" → Driver won't be used!")
exit(1)
# Test 2: Can we instantiate it?
print("\n2. Testing Driver Instantiation...")
try:
class MockApp:
pass
driver = ResponsiveWindowsDriver(MockApp(), debug=True, mouse=True)
print(f" ✅ Driver instantiated")
print(f" → Driver class: {type(driver).__name__}")
except Exception as e:
print(f" ❌ FAILED: {e}")
import traceback
traceback.print_exc()
# Test 3: What size does it detect?
print("\n3. Testing Size Detection...")
try:
detected = driver._detect_window_size()
if detected:
print(f" ✅ Detected size: {detected.width} × {detected.height}")
else:
print(f" ❌ Detection returned None")
except Exception as e:
print(f" ❌ FAILED: {e}")
# Test 4: Run the actual app and check driver
print("\n4. Running MainDashboard to verify driver is used...")
print(" (Launching app - press 'q' to quit)")
print("=" * 70)
from Quant_TUI.app.main_dashboard import MainDashboard
class DebugDashboard(MainDashboard):
def on_mount(self):
# Check what driver we're using
driver_class = type(self.driver).__name__
self.notify(f"Driver: {driver_class} | Size: {self.size}")
# Call parent on_mount
super().on_mount()
app = DebugDashboard()
app.run()