@@ -437,11 +437,12 @@ def test_height(self):
437
437
438
438
def _show_drop_down_listbox (self ):
439
439
width = self .combo .winfo_width ()
440
- self .combo .event_generate ('<ButtonPress-1>' , x = width - 5 , y = 5 )
441
- self .combo .event_generate ('<ButtonRelease-1>' , x = width - 5 , y = 5 )
440
+ x , y = width - 5 , 5
441
+ self .assertRegex (self .combo .identify (x , y ), r'.*downarrow\Z' )
442
+ self .combo .event_generate ('<ButtonPress-1>' , x = x , y = y )
443
+ self .combo .event_generate ('<ButtonRelease-1>' , x = x , y = y )
442
444
self .combo .update_idletasks ()
443
445
444
-
445
446
def test_virtual_event (self ):
446
447
success = []
447
448
@@ -1088,6 +1089,7 @@ def test_traversal(self):
1088
1089
1089
1090
self .nb .select (0 )
1090
1091
1092
+ self .assertEqual (self .nb .identify (5 , 5 ), 'focus' )
1091
1093
simulate_mouse_click (self .nb , 5 , 5 )
1092
1094
self .nb .focus_force ()
1093
1095
self .nb .event_generate ('<Control-Tab>' )
@@ -1102,6 +1104,7 @@ def test_traversal(self):
1102
1104
self .nb .tab (self .child1 , text = 'a' , underline = 0 )
1103
1105
self .nb .enable_traversal ()
1104
1106
self .nb .focus_force ()
1107
+ self .assertEqual (self .nb .identify (5 , 5 ), 'focus' )
1105
1108
simulate_mouse_click (self .nb , 5 , 5 )
1106
1109
if sys .platform == 'darwin' :
1107
1110
self .nb .event_generate ('<Option-a>' )
@@ -1132,6 +1135,7 @@ def _click_increment_arrow(self):
1132
1135
height = self .spin .winfo_height ()
1133
1136
x = width - 5
1134
1137
y = height // 2 - 5
1138
+ self .assertRegex (self .spin .identify (x , y ), r'.*uparrow\Z' )
1135
1139
self .spin .event_generate ('<ButtonPress-1>' , x = x , y = y )
1136
1140
self .spin .event_generate ('<ButtonRelease-1>' , x = x , y = y )
1137
1141
self .spin .update_idletasks ()
@@ -1141,6 +1145,7 @@ def _click_decrement_arrow(self):
1141
1145
height = self .spin .winfo_height ()
1142
1146
x = width - 5
1143
1147
y = height // 2 + 4
1148
+ self .assertRegex (self .spin .identify (x , y ), r'.*downarrow\Z' )
1144
1149
self .spin .event_generate ('<ButtonPress-1>' , x = x , y = y )
1145
1150
self .spin .event_generate ('<ButtonRelease-1>' , x = x , y = y )
1146
1151
self .spin .update_idletasks ()
@@ -1530,6 +1535,9 @@ def test_heading(self):
1530
1535
1531
1536
def test_heading_callback (self ):
1532
1537
def simulate_heading_click (x , y ):
1538
+ if tcl_version >= (8 , 6 ):
1539
+ self .assertEqual (self .tv .identify_column (x ), '#0' )
1540
+ self .assertEqual (self .tv .identify_region (x , y ), 'heading' )
1533
1541
simulate_mouse_click (self .tv , x , y )
1534
1542
self .tv .update ()
1535
1543
0 commit comments