forked from DonnieDice/protondrive-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_app.py
More file actions
68 lines (57 loc) · 1.94 KB
/
Copy pathtest_app.py
File metadata and controls
68 lines (57 loc) · 1.94 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
67
68
#!/usr/bin/env python3
"""Test script to verify ProtonDrive GUI functionality"""
import sys
import subprocess
import time
def test_rclone():
"""Test if rclone is available and has ProtonDrive support"""
try:
result = subprocess.run(['rclone', 'version'], capture_output=True, text=True)
print("✅ rclone is installed:", result.stdout.split('\n')[0])
# Check for protondrive backend
result = subprocess.run(['rclone', 'listremotes'], capture_output=True, text=True)
print("✅ rclone can list remotes")
return True
except Exception as e:
print("❌ rclone test failed:", e)
return False
def test_gui_import():
"""Test if GUI can be imported"""
try:
from protondrive.gui import ProtonDriveGUI
print("✅ GUI module imports successfully")
return True
except Exception as e:
print("❌ GUI import failed:", e)
return False
def test_tkinter():
"""Test if tkinter is available"""
try:
import tkinter
print("✅ tkinter is available")
return True
except Exception as e:
print("❌ tkinter not available:", e)
return False
def main():
print("🧪 Testing ProtonDrive Linux Client...")
print("-" * 50)
tests = [
("rclone availability", test_rclone),
("GUI module import", test_gui_import),
("tkinter availability", test_tkinter),
]
passed = 0
for test_name, test_func in tests:
print(f"\nTesting {test_name}...")
if test_func():
passed += 1
print("\n" + "-" * 50)
print(f"✅ Passed {passed}/{len(tests)} tests")
if passed == len(tests):
print("🎉 All tests passed! ProtonDrive GUI is ready to use.")
print("\nLaunch with: python -m protondrive")
else:
print("⚠️ Some tests failed. Please check the requirements.")
if __name__ == "__main__":
main()