@@ -435,11 +435,12 @@ def test_height(self):
435435
436436 def _show_drop_down_listbox (self ):
437437 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 )
440442 self .combo .update_idletasks ()
441443
442-
443444 def test_virtual_event (self ):
444445 success = []
445446
@@ -1085,6 +1086,7 @@ def test_traversal(self):
10851086
10861087 self .nb .select (0 )
10871088
1089+ self .assertEqual (self .nb .identify (5 , 5 ), 'focus' )
10881090 simulate_mouse_click (self .nb , 5 , 5 )
10891091 self .nb .focus_force ()
10901092 self .nb .event_generate ('<Control-Tab>' )
@@ -1099,6 +1101,7 @@ def test_traversal(self):
10991101 self .nb .tab (self .child1 , text = 'a' , underline = 0 )
11001102 self .nb .enable_traversal ()
11011103 self .nb .focus_force ()
1104+ self .assertEqual (self .nb .identify (5 , 5 ), 'focus' )
11021105 simulate_mouse_click (self .nb , 5 , 5 )
11031106 if sys .platform == 'darwin' :
11041107 self .nb .event_generate ('<Option-a>' )
@@ -1129,6 +1132,7 @@ def _click_increment_arrow(self):
11291132 height = self .spin .winfo_height ()
11301133 x = width - 5
11311134 y = height // 2 - 5
1135+ self .assertRegex (self .spin .identify (x , y ), r'.*uparrow\Z' )
11321136 self .spin .event_generate ('<ButtonPress-1>' , x = x , y = y )
11331137 self .spin .event_generate ('<ButtonRelease-1>' , x = x , y = y )
11341138 self .spin .update_idletasks ()
@@ -1138,6 +1142,7 @@ def _click_decrement_arrow(self):
11381142 height = self .spin .winfo_height ()
11391143 x = width - 5
11401144 y = height // 2 + 4
1145+ self .assertRegex (self .spin .identify (x , y ), r'.*downarrow\Z' )
11411146 self .spin .event_generate ('<ButtonPress-1>' , x = x , y = y )
11421147 self .spin .event_generate ('<ButtonRelease-1>' , x = x , y = y )
11431148 self .spin .update_idletasks ()
@@ -1526,6 +1531,9 @@ def test_heading(self):
15261531
15271532 def test_heading_callback (self ):
15281533 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' )
15291537 simulate_mouse_click (self .tv , x , y )
15301538 self .tv .update ()
15311539
0 commit comments