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