@@ -745,6 +745,29 @@ def test_yscrollincrement(self):
745745 self .checkPixelsParam (widget , 'yscrollincrement' ,
746746 10 , 0 , 11.2 , 13.6 , - 10 , '0.1i' )
747747
748+ @requires_tcl (8 , 6 )
749+ def test_moveto (self ):
750+ widget = self .create ()
751+ i1 = widget .create_rectangle (1 , 1 , 20 , 20 , tags = 'group' )
752+ i2 = widget .create_rectangle (30 , 30 , 50 , 70 , tags = 'group' )
753+ x1 , y1 , _ , _ = widget .bbox (i1 )
754+ x2 , y2 , _ , _ = widget .bbox (i2 )
755+ widget .moveto ('group' , 200 , 100 )
756+ x1_2 , y1_2 , _ , _ = widget .bbox (i1 )
757+ x2_2 , y2_2 , _ , _ = widget .bbox (i2 )
758+ self .assertEqual (x1_2 , 200 )
759+ self .assertEqual (y1_2 , 100 )
760+ self .assertEqual (x2 - x1 , x2_2 - x1_2 )
761+ self .assertEqual (y2 - y1 , y2_2 - y1_2 )
762+ widget .tag_lower (i2 , i1 )
763+ widget .moveto ('group' , y = 50 )
764+ x1_3 , y1_3 , _ , _ = widget .bbox (i1 )
765+ x2_3 , y2_3 , _ , _ = widget .bbox (i2 )
766+ self .assertEqual (y2_3 , 50 )
767+ self .assertEqual (x2_3 , x2_2 )
768+ self .assertEqual (x2_2 - x1_2 , x2_3 - x1_3 )
769+ self .assertEqual (y2_2 - y1_2 , y2_3 - y1_3 )
770+
748771
749772@add_standard_options (IntegerSizeTests , StandardOptionsTests )
750773class ListboxTest (AbstractWidgetTest , unittest .TestCase ):
0 commit comments