@@ -437,11 +437,12 @@ def test_height(self):
437437
438438 def _show_drop_down_listbox (self ):
439439 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 )
442444 self .combo .update_idletasks ()
443445
444-
445446 def test_virtual_event (self ):
446447 success = []
447448
@@ -1088,6 +1089,7 @@ def test_traversal(self):
10881089
10891090 self .nb .select (0 )
10901091
1092+ self .assertEqual (self .nb .identify (5 , 5 ), 'focus' )
10911093 simulate_mouse_click (self .nb , 5 , 5 )
10921094 self .nb .focus_force ()
10931095 self .nb .event_generate ('<Control-Tab>' )
@@ -1102,6 +1104,7 @@ def test_traversal(self):
11021104 self .nb .tab (self .child1 , text = 'a' , underline = 0 )
11031105 self .nb .enable_traversal ()
11041106 self .nb .focus_force ()
1107+ self .assertEqual (self .nb .identify (5 , 5 ), 'focus' )
11051108 simulate_mouse_click (self .nb , 5 , 5 )
11061109 if sys .platform == 'darwin' :
11071110 self .nb .event_generate ('<Option-a>' )
@@ -1132,6 +1135,7 @@ def _click_increment_arrow(self):
11321135 height = self .spin .winfo_height ()
11331136 x = width - 5
11341137 y = height // 2 - 5
1138+ self .assertRegex (self .spin .identify (x , y ), r'.*uparrow\Z' )
11351139 self .spin .event_generate ('<ButtonPress-1>' , x = x , y = y )
11361140 self .spin .event_generate ('<ButtonRelease-1>' , x = x , y = y )
11371141 self .spin .update_idletasks ()
@@ -1141,6 +1145,7 @@ def _click_decrement_arrow(self):
11411145 height = self .spin .winfo_height ()
11421146 x = width - 5
11431147 y = height // 2 + 4
1148+ self .assertRegex (self .spin .identify (x , y ), r'.*downarrow\Z' )
11441149 self .spin .event_generate ('<ButtonPress-1>' , x = x , y = y )
11451150 self .spin .event_generate ('<ButtonRelease-1>' , x = x , y = y )
11461151 self .spin .update_idletasks ()
@@ -1530,6 +1535,9 @@ def test_heading(self):
15301535
15311536 def test_heading_callback (self ):
15321537 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' )
15331541 simulate_mouse_click (self .tv , x , y )
15341542 self .tv .update ()
15351543
0 commit comments