-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_board.py
More file actions
36 lines (27 loc) · 951 Bytes
/
Copy pathtest_board.py
File metadata and controls
36 lines (27 loc) · 951 Bytes
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
#!/usr/bin/env python3
"""
Test script to verify board functionality
"""
import sys
from PyQt5.QtWidgets import QApplication
from src.canvas import TutorCanvas
def test_board_functionality():
"""Test the board toggle functionality"""
app = QApplication(sys.argv)
# Create canvas
canvas = TutorCanvas()
print(f"Initial board mode: {canvas.board_mode}")
# Test toggle cycle
print("Testing board toggle functionality...")
# First toggle: transparent -> white
canvas.toggle_board()
print(f"After 1st toggle: {canvas.board_mode}")
# Second toggle: white -> black
canvas.toggle_board()
print(f"After 2nd toggle: {canvas.board_mode}")
# Third toggle: black -> transparent
canvas.toggle_board()
print(f"After 3rd toggle: {canvas.board_mode}")
print("Board functionality test completed successfully!")
if __name__ == "__main__":
test_board_functionality()