<s> import unittest <EOL> import re <EOL> import Tkinter as tkinter <EOL> from Tkinter import TclError <EOL> from test . test_support import requires , run_unittest <EOL> from test_ttk . support import pixels_conv , tcl_version , requires_tcl <EOL> from widget_tests import AbstractWidgetTest , int_round <EOL> requires ( '<STR_LIT>' ) <EOL> class PackTest ( AbstractWidgetTest , unittest . TestCase ) : <EOL> def create2 ( self ) : <EOL> pack = tkinter . Toplevel ( self . root , name = '<STR_LIT>' ) <EOL> pack . wm_geometry ( '<STR_LIT>' ) <EOL> pack . wm_minsize ( <NUM_LIT:1> , <NUM_LIT:1> ) <EOL> a = tkinter . Frame ( pack , name = '<STR_LIT:a>' , width = <NUM_LIT:20> , height = <NUM_LIT> , bg = '<STR_LIT>' ) <EOL> b = tkinter . Frame ( pack , name = '<STR_LIT:b>' , width = <NUM_LIT:50> , height = <NUM_LIT:30> , bg = '<STR_LIT>' ) <EOL> c = tkinter . Frame ( pack , name = '<STR_LIT:c>' , width = <NUM_LIT> , height = <NUM_LIT> , bg = '<STR_LIT>' ) <EOL> d = tkinter . Frame ( pack , name = '<STR_LIT:d>' , width = <NUM_LIT> , height = <NUM_LIT:30> , bg = '<STR_LIT>' ) <EOL> return pack , a , b , c , d <EOL> def test_pack_configure_after ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' % b ) : <EOL> a . pack_configure ( after = b ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> a . pack_configure ( after = '<STR_LIT>' ) <EOL> a . pack_configure ( side = '<STR_LIT>' ) <EOL> b . pack_configure ( side = '<STR_LIT>' ) <EOL> c . pack_configure ( side = '<STR_LIT>' ) <EOL> d . pack_configure ( side = '<STR_LIT>' ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a , b , c , d ] ) <EOL> a . pack_configure ( after = b ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ b , a , c , d ] ) <EOL> a . pack_configure ( after = a ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ b , a , c , d ] ) <EOL> def test_pack_configure_anchor ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> def check ( anchor , geom ) : <EOL> a . pack_configure ( side = '<STR_LIT>' , ipadx = <NUM_LIT:5> , padx = <NUM_LIT:10> , ipady = <NUM_LIT:15> , pady = <NUM_LIT:20> , <EOL> expand = True , anchor = anchor ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( a . winfo_geometry ( ) , geom ) <EOL> check ( '<STR_LIT:n>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT:e>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT:s>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT:w>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_pack_configure_before ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' % b ) : <EOL> a . pack_configure ( before = b ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> a . pack_configure ( before = '<STR_LIT>' ) <EOL> a . pack_configure ( side = '<STR_LIT>' ) <EOL> b . pack_configure ( side = '<STR_LIT>' ) <EOL> c . pack_configure ( side = '<STR_LIT>' ) <EOL> d . pack_configure ( side = '<STR_LIT>' ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a , b , c , d ] ) <EOL> a . pack_configure ( before = d ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ b , c , a , d ] ) <EOL> a . pack_configure ( before = a ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ b , c , a , d ] ) <EOL> def test_pack_configure_expand ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> def check ( * geoms ) : <EOL> self . root . update ( ) <EOL> self . assertEqual ( a . winfo_geometry ( ) , geoms [ <NUM_LIT:0> ] ) <EOL> self . assertEqual ( b . winfo_geometry ( ) , geoms [ <NUM_LIT:1> ] ) <EOL> self . assertEqual ( c . winfo_geometry ( ) , geoms [ <NUM_LIT:2> ] ) <EOL> self . assertEqual ( d . winfo_geometry ( ) , geoms [ <NUM_LIT:3> ] ) <EOL> a . pack_configure ( side = '<STR_LIT:left>' ) <EOL> b . pack_configure ( side = '<STR_LIT>' ) <EOL> c . pack_configure ( side = '<STR_LIT:right>' ) <EOL> d . pack_configure ( side = '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> a . pack_configure ( side = '<STR_LIT:left>' , expand = '<STR_LIT:yes>' ) <EOL> b . pack_configure ( side = '<STR_LIT>' , expand = '<STR_LIT>' ) <EOL> c . pack_configure ( side = '<STR_LIT:right>' , expand = True ) <EOL> d . pack_configure ( side = '<STR_LIT>' , expand = <NUM_LIT:1> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> a . pack_configure ( side = '<STR_LIT:left>' , expand = '<STR_LIT:yes>' , fill = '<STR_LIT>' ) <EOL> b . pack_configure ( side = '<STR_LIT>' , expand = '<STR_LIT>' , fill = '<STR_LIT>' ) <EOL> c . pack_configure ( side = '<STR_LIT:right>' , expand = True , fill = '<STR_LIT>' ) <EOL> d . pack_configure ( side = '<STR_LIT>' , expand = <NUM_LIT:1> , fill = '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_pack_configure_in ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> a . pack_configure ( side = '<STR_LIT>' ) <EOL> b . pack_configure ( side = '<STR_LIT>' ) <EOL> c . pack_configure ( side = '<STR_LIT>' ) <EOL> d . pack_configure ( side = '<STR_LIT>' ) <EOL> a . pack_configure ( in_ = pack ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ b , c , d , a ] ) <EOL> a . pack_configure ( in_ = c ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ b , c , d ] ) <EOL> self . assertEqual ( c . pack_slaves ( ) , [ a ] ) <EOL> with self . assertRaisesRegexp ( TclError , <EOL> '<STR_LIT>' % ( a , ) ) : <EOL> a . pack_configure ( in_ = a ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> a . pack_configure ( in_ = '<STR_LIT>' ) <EOL> def test_pack_configure_padx_ipadx_fill ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> def check ( geom1 , geom2 , ** kwargs ) : <EOL> a . pack_forget ( ) <EOL> b . pack_forget ( ) <EOL> a . pack_configure ( ** kwargs ) <EOL> b . pack_configure ( expand = True , fill = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( a . winfo_geometry ( ) , geom1 ) <EOL> self . assertEqual ( b . winfo_geometry ( ) , geom2 ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , padx = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , padx = ( <NUM_LIT:10> , <NUM_LIT:30> ) ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , ipadx = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , ipadx = <NUM_LIT:5> , padx = <NUM_LIT:10> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , padx = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT:right>' , padx = ( <NUM_LIT:9> , <NUM_LIT> ) , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , ipadx = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT:right>' , ipadx = <NUM_LIT:5> , padx = <NUM_LIT:10> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT:right>' , ipadx = <NUM_LIT:5> , padx = ( <NUM_LIT:5> , <NUM_LIT:15> ) , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , padx = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , padx = ( <NUM_LIT:0> , <NUM_LIT> ) ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipadx = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipadx = <NUM_LIT:5> , padx = <NUM_LIT:10> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipadx = <NUM_LIT:5> , padx = ( <NUM_LIT:5> , <NUM_LIT:15> ) ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , padx = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT>' , padx = ( <NUM_LIT> , <NUM_LIT:15> ) , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipadx = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT>' , ipadx = <NUM_LIT:5> , padx = <NUM_LIT:10> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT>' , ipadx = <NUM_LIT:5> , padx = ( <NUM_LIT:5> , <NUM_LIT:15> ) , fill = '<STR_LIT:x>' ) <EOL> a . pack_configure ( padx = '<STR_LIT>' ) <EOL> self . assertEqual ( a . pack_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( pack . winfo_pixels ( '<STR_LIT>' ) ) ) <EOL> a . pack_configure ( ipadx = '<STR_LIT>' ) <EOL> self . assertEqual ( a . pack_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( pack . winfo_pixels ( '<STR_LIT>' ) ) ) <EOL> def test_pack_configure_pady_ipady_fill ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> def check ( geom1 , geom2 , ** kwargs ) : <EOL> a . pack_forget ( ) <EOL> b . pack_forget ( ) <EOL> a . pack_configure ( ** kwargs ) <EOL> b . pack_configure ( expand = True , fill = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( a . winfo_geometry ( ) , geom1 ) <EOL> self . assertEqual ( b . winfo_geometry ( ) , geom2 ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , pady = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , pady = ( <NUM_LIT:10> , <NUM_LIT:30> ) ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , ipady = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , ipady = <NUM_LIT:5> , pady = <NUM_LIT:10> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , pady = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT:right>' , pady = ( <NUM_LIT:9> , <NUM_LIT> ) , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT:right>' , ipady = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT:right>' , ipady = <NUM_LIT:5> , pady = <NUM_LIT:10> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT:right>' , ipady = <NUM_LIT:5> , pady = ( <NUM_LIT:5> , <NUM_LIT:15> ) , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , pady = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , pady = ( <NUM_LIT:0> , <NUM_LIT> ) ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipady = <NUM_LIT:20> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipady = <NUM_LIT:5> , pady = <NUM_LIT:10> ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipady = <NUM_LIT:5> , pady = ( <NUM_LIT:5> , <NUM_LIT:15> ) ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , pady = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT>' , pady = ( <NUM_LIT> , <NUM_LIT:15> ) , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , side = '<STR_LIT>' , ipady = <NUM_LIT:20> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT>' , ipady = <NUM_LIT:5> , pady = <NUM_LIT:10> , fill = '<STR_LIT:x>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , <EOL> side = '<STR_LIT>' , ipady = <NUM_LIT:5> , pady = ( <NUM_LIT:5> , <NUM_LIT:15> ) , fill = '<STR_LIT:x>' ) <EOL> a . pack_configure ( pady = '<STR_LIT>' ) <EOL> self . assertEqual ( a . pack_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( pack . winfo_pixels ( '<STR_LIT>' ) ) ) <EOL> a . pack_configure ( ipady = '<STR_LIT>' ) <EOL> self . assertEqual ( a . pack_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( pack . winfo_pixels ( '<STR_LIT>' ) ) ) <EOL> def test_pack_configure_side ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> def check ( side , geom1 , geom2 ) : <EOL> a . pack_configure ( side = side ) <EOL> self . assertEqual ( a . pack_info ( ) [ '<STR_LIT>' ] , side ) <EOL> b . pack_configure ( expand = True , fill = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( a . winfo_geometry ( ) , geom1 ) <EOL> self . assertEqual ( b . winfo_geometry ( ) , geom2 ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> check ( '<STR_LIT:right>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_pack_forget ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> a . pack_configure ( ) <EOL> b . pack_configure ( ) <EOL> c . pack_configure ( ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a , b , c ] ) <EOL> b . pack_forget ( ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a , c ] ) <EOL> b . pack_forget ( ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a , c ] ) <EOL> d . pack_forget ( ) <EOL> def test_pack_info ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' % a ) : <EOL> a . pack_info ( ) <EOL> a . pack_configure ( ) <EOL> b . pack_configure ( side = '<STR_LIT:right>' , in_ = a , anchor = '<STR_LIT:s>' , expand = True , fill = '<STR_LIT:x>' , <EOL> ipadx = <NUM_LIT:5> , padx = <NUM_LIT:10> , ipady = <NUM_LIT:2> , pady = ( <NUM_LIT:5> , <NUM_LIT:15> ) ) <EOL> info = a . pack_info ( ) <EOL> self . assertIsInstance ( info , dict ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT:none>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , pack ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> info = b . pack_info ( ) <EOL> self . assertIsInstance ( info , dict ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT:s>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT:x>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , a ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:5> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:10> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( ( <NUM_LIT:5> , <NUM_LIT:15> ) ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT:right>' ) <EOL> def test_pack_propagate ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> pack . configure ( width = <NUM_LIT> , height = <NUM_LIT:200> ) <EOL> a . pack_configure ( ) <EOL> pack . pack_propagate ( False ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( pack . winfo_reqwidth ( ) , <NUM_LIT> ) <EOL> self . assertEqual ( pack . winfo_reqheight ( ) , <NUM_LIT:200> ) <EOL> pack . pack_propagate ( True ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( pack . winfo_reqwidth ( ) , <NUM_LIT:20> ) <EOL> self . assertEqual ( pack . winfo_reqheight ( ) , <NUM_LIT> ) <EOL> def test_pack_slaves ( self ) : <EOL> pack , a , b , c , d = self . create2 ( ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ ] ) <EOL> a . pack_configure ( ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a ] ) <EOL> b . pack_configure ( ) <EOL> self . assertEqual ( pack . pack_slaves ( ) , [ a , b ] ) <EOL> class PlaceTest ( AbstractWidgetTest , unittest . TestCase ) : <EOL> def create2 ( self ) : <EOL> t = tkinter . Toplevel ( self . root , width = <NUM_LIT> , height = <NUM_LIT:200> , bd = <NUM_LIT:0> ) <EOL> t . wm_geometry ( '<STR_LIT>' ) <EOL> f = tkinter . Frame ( t , width = <NUM_LIT> , height = <NUM_LIT> , bd = <NUM_LIT:2> , relief = '<STR_LIT>' ) <EOL> f . place_configure ( x = <NUM_LIT> , y = <NUM_LIT> ) <EOL> f2 = tkinter . Frame ( t , width = <NUM_LIT:30> , height = <NUM_LIT> , bd = <NUM_LIT:2> , relief = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> return t , f , f2 <EOL> def test_place_configure_in ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> self . assertEqual ( f2 . winfo_manager ( ) , '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , "<STR_LIT>" <EOL> "<STR_LIT>" % re . escape ( str ( f2 ) ) ) : <EOL> f2 . place_configure ( in_ = f2 ) <EOL> if tcl_version >= ( <NUM_LIT:8> , <NUM_LIT:5> ) : <EOL> self . assertEqual ( f2 . winfo_manager ( ) , '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f2 . place_configure ( in_ = '<STR_LIT>' ) <EOL> f2 . place_configure ( in_ = f ) <EOL> self . assertEqual ( f2 . winfo_manager ( ) , '<STR_LIT>' ) <EOL> def test_place_configure_x ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT:x>' ] , '<STR_LIT:0>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_x ( ) , <NUM_LIT:50> ) <EOL> f2 . place_configure ( x = <NUM_LIT:100> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT:x>' ] , '<STR_LIT:100>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_x ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( x = - <NUM_LIT:10> , relx = <NUM_LIT:1> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT:x>' ] , '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_x ( ) , <NUM_LIT> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f2 . place_configure ( in_ = f , x = '<STR_LIT>' ) <EOL> def test_place_configure_y ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT:y>' ] , '<STR_LIT:0>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_y ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( y = <NUM_LIT:50> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT:y>' ] , '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_y ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( y = - <NUM_LIT:10> , rely = <NUM_LIT:1> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT:y>' ] , '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_y ( ) , <NUM_LIT> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f2 . place_configure ( in_ = f , y = '<STR_LIT>' ) <EOL> def test_place_configure_relx ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT>' ] , '<STR_LIT:0>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_x ( ) , <NUM_LIT:50> ) <EOL> f2 . place_configure ( relx = <NUM_LIT:0.5> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_x ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( relx = <NUM_LIT:1> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT>' ] , '<STR_LIT:1>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_x ( ) , <NUM_LIT:200> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> f2 . place_configure ( in_ = f , relx = '<STR_LIT>' ) <EOL> def test_place_configure_rely ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT>' ] , '<STR_LIT:0>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_y ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( rely = <NUM_LIT:0.5> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_y ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( rely = <NUM_LIT:1> ) <EOL> self . assertEqual ( f2 . place_info ( ) [ '<STR_LIT>' ] , '<STR_LIT:1>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_y ( ) , <NUM_LIT> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> f2 . place_configure ( in_ = f , rely = '<STR_LIT>' ) <EOL> def test_place_configure_anchor ( self ) : <EOL> f = tkinter . Frame ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f . place_configure ( anchor = '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f . place_configure ( anchor = '<STR_LIT>' ) <EOL> for value in '<STR_LIT:n>' , '<STR_LIT>' , '<STR_LIT:e>' , '<STR_LIT>' , '<STR_LIT:s>' , '<STR_LIT>' , '<STR_LIT:w>' , '<STR_LIT>' , '<STR_LIT>' : <EOL> f . place_configure ( anchor = value ) <EOL> self . assertEqual ( f . place_info ( ) [ '<STR_LIT>' ] , value ) <EOL> def test_place_configure_width ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f , width = <NUM_LIT> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_width ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( width = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_width ( ) , <NUM_LIT:30> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f2 . place_configure ( width = '<STR_LIT>' ) <EOL> def test_place_configure_height ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f , height = <NUM_LIT> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_height ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( height = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_height ( ) , <NUM_LIT> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f2 . place_configure ( height = '<STR_LIT>' ) <EOL> def test_place_configure_relwidth ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f , relwidth = <NUM_LIT:0.5> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_width ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( relwidth = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_width ( ) , <NUM_LIT:30> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> f2 . place_configure ( relwidth = '<STR_LIT>' ) <EOL> def test_place_configure_relheight ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f , relheight = <NUM_LIT:0.5> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_height ( ) , <NUM_LIT> ) <EOL> f2 . place_configure ( relheight = '<STR_LIT>' ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f2 . winfo_height ( ) , <NUM_LIT> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> f2 . place_configure ( relheight = '<STR_LIT>' ) <EOL> def test_place_configure_bordermode ( self ) : <EOL> f = tkinter . Frame ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f . place_configure ( bordermode = '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f . place_configure ( bordermode = '<STR_LIT>' ) <EOL> for value in '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:ignore>' : <EOL> f . place_configure ( bordermode = value ) <EOL> self . assertEqual ( f . place_info ( ) [ '<STR_LIT>' ] , value ) <EOL> def test_place_forget ( self ) : <EOL> foo = tkinter . Frame ( self . root ) <EOL> foo . place_configure ( width = <NUM_LIT:50> , height = <NUM_LIT:50> ) <EOL> self . root . update ( ) <EOL> foo . place_forget ( ) <EOL> self . root . update ( ) <EOL> self . assertFalse ( foo . winfo_ismapped ( ) ) <EOL> with self . assertRaises ( TypeError ) : <EOL> foo . place_forget ( <NUM_LIT:0> ) <EOL> def test_place_info ( self ) : <EOL> t , f , f2 = self . create2 ( ) <EOL> f2 . place_configure ( in_ = f , x = <NUM_LIT:1> , y = <NUM_LIT:2> , width = <NUM_LIT:3> , height = <NUM_LIT:4> , <EOL> relx = <NUM_LIT:0.1> , rely = <NUM_LIT> , relwidth = <NUM_LIT> , relheight = <NUM_LIT> , <EOL> anchor = '<STR_LIT>' , bordermode = '<STR_LIT>' ) <EOL> info = f2 . place_info ( ) <EOL> self . assertIsInstance ( info , dict ) <EOL> self . assertEqual ( info [ '<STR_LIT:x>' ] , '<STR_LIT:1>' ) <EOL> self . assertEqual ( info [ '<STR_LIT:y>' ] , '<STR_LIT:2>' ) <EOL> self . assertEqual ( info [ '<STR_LIT:width>' ] , '<STR_LIT:3>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT:4>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( info [ '<STR_LIT:x>' ] , '<STR_LIT:1>' ) <EOL> self . assertEqual ( info [ '<STR_LIT:x>' ] , '<STR_LIT:1>' ) <EOL> with self . assertRaises ( TypeError ) : <EOL> f2 . place_info ( <NUM_LIT:0> ) <EOL> def test_place_slaves ( self ) : <EOL> foo = tkinter . Frame ( self . root ) <EOL> bar = tkinter . Frame ( self . root ) <EOL> self . assertEqual ( foo . place_slaves ( ) , [ ] ) <EOL> bar . place_configure ( in_ = foo ) <EOL> self . assertEqual ( foo . place_slaves ( ) , [ bar ] ) <EOL> with self . assertRaises ( TypeError ) : <EOL> foo . place_slaves ( <NUM_LIT:0> ) <EOL> class GridTest ( AbstractWidgetTest , unittest . TestCase ) : <EOL> def tearDown ( self ) : <EOL> cols , rows = self . root . grid_size ( ) <EOL> for i in range ( cols + <NUM_LIT:1> ) : <EOL> self . root . grid_columnconfigure ( i , weight = <NUM_LIT:0> , minsize = <NUM_LIT:0> , pad = <NUM_LIT:0> , uniform = '<STR_LIT>' ) <EOL> for i in range ( rows + <NUM_LIT:1> ) : <EOL> self . root . grid_rowconfigure ( i , weight = <NUM_LIT:0> , minsize = <NUM_LIT:0> , pad = <NUM_LIT:0> , uniform = '<STR_LIT>' ) <EOL> self . root . grid_propagate ( <NUM_LIT:1> ) <EOL> super ( GridTest , self ) . tearDown ( ) <EOL> def test_grid_configure ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> self . assertEqual ( b . grid_info ( ) , { } ) <EOL> b . grid_configure ( ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . root ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> b . grid_configure ( { '<STR_LIT>' : <NUM_LIT:1> } , row = <NUM_LIT:2> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> def test_grid_configure_column ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( column = - <NUM_LIT:1> ) <EOL> b . grid_configure ( column = <NUM_LIT:2> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> def test_grid_configure_columnspan ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( columnspan = <NUM_LIT:0> ) <EOL> b . grid_configure ( columnspan = <NUM_LIT:2> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> def test_grid_configure_in ( self ) : <EOL> f = tkinter . Frame ( self . root ) <EOL> b = tkinter . Button ( self . root ) <EOL> self . assertEqual ( b . grid_info ( ) , { } ) <EOL> b . grid_configure ( ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . root ) <EOL> b . grid_configure ( in_ = f ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , f ) <EOL> b . grid_configure ( { '<STR_LIT>' : self . root } ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . root ) <EOL> def test_grid_configure_ipadx ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( ipadx = - <NUM_LIT:1> ) <EOL> b . grid_configure ( ipadx = <NUM_LIT:1> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> b . grid_configure ( ipadx = '<STR_LIT>' ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( int_round ( pixels_conv ( '<STR_LIT>' ) * self . scaling ) ) ) <EOL> def test_grid_configure_ipady ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( ipady = - <NUM_LIT:1> ) <EOL> b . grid_configure ( ipady = <NUM_LIT:1> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> b . grid_configure ( ipady = '<STR_LIT>' ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( int_round ( pixels_conv ( '<STR_LIT>' ) * self . scaling ) ) ) <EOL> def test_grid_configure_padx ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( padx = - <NUM_LIT:1> ) <EOL> b . grid_configure ( padx = <NUM_LIT:1> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> b . grid_configure ( padx = ( <NUM_LIT:10> , <NUM_LIT:5> ) ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( ( <NUM_LIT:10> , <NUM_LIT:5> ) ) ) <EOL> b . grid_configure ( padx = '<STR_LIT>' ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( int_round ( pixels_conv ( '<STR_LIT>' ) * self . scaling ) ) ) <EOL> def test_grid_configure_pady ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( pady = - <NUM_LIT:1> ) <EOL> b . grid_configure ( pady = <NUM_LIT:1> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> b . grid_configure ( pady = ( <NUM_LIT:10> , <NUM_LIT:5> ) ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( ( <NUM_LIT:10> , <NUM_LIT:5> ) ) ) <EOL> b . grid_configure ( pady = '<STR_LIT>' ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , <EOL> self . _str ( int_round ( pixels_conv ( '<STR_LIT>' ) * self . scaling ) ) ) <EOL> def test_grid_configure_row ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( row = - <NUM_LIT:1> ) <EOL> b . grid_configure ( row = <NUM_LIT:2> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> def test_grid_configure_rownspan ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> b . grid_configure ( rowspan = <NUM_LIT:0> ) <EOL> b . grid_configure ( rowspan = <NUM_LIT:2> ) <EOL> self . assertEqual ( b . grid_info ( ) [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> def test_grid_configure_sticky ( self ) : <EOL> f = tkinter . Frame ( self . root , bg = '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> f . grid_configure ( sticky = '<STR_LIT>' ) <EOL> f . grid_configure ( sticky = '<STR_LIT>' ) <EOL> self . assertEqual ( f . grid_info ( ) [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> f . grid_configure ( sticky = '<STR_LIT>' ) <EOL> self . assertEqual ( f . grid_info ( ) [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_grid_columnconfigure ( self ) : <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_columnconfigure ( ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> ) , <EOL> { '<STR_LIT>' : <NUM_LIT:0> , '<STR_LIT>' : <NUM_LIT:0> , '<STR_LIT>' : None , '<STR_LIT>' : <NUM_LIT:0> } ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT:foo>' ) <EOL> self . root . grid_columnconfigure ( ( <NUM_LIT:0> , <NUM_LIT:3> ) , weight = <NUM_LIT:2> ) <EOL> with self . assertRaisesRegexp ( TclError , <EOL> '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( ( <NUM_LIT:0> , <NUM_LIT:3> ) ) <EOL> b = tkinter . Button ( self . root ) <EOL> b . grid_configure ( column = <NUM_LIT:0> , row = <NUM_LIT:0> ) <EOL> if tcl_version >= ( <NUM_LIT:8> , <NUM_LIT:5> ) : <EOL> self . root . grid_columnconfigure ( '<STR_LIT:all>' , weight = <NUM_LIT:3> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( '<STR_LIT:all>' ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:3> , '<STR_LIT>' ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT> , '<STR_LIT>' ) , <NUM_LIT:0> ) <EOL> if tcl_version >= ( <NUM_LIT:8> , <NUM_LIT:5> ) : <EOL> self . root . grid_columnconfigure ( b , weight = <NUM_LIT:4> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:4> ) <EOL> def test_grid_columnconfigure_minsize ( self ) : <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , minsize = '<STR_LIT:foo>' ) <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , minsize = <NUM_LIT:10> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:10> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , <NUM_LIT:10> ) <EOL> def test_grid_columnconfigure_weight ( self ) : <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , weight = '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , weight = - <NUM_LIT:3> ) <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , weight = <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , <NUM_LIT:3> ) <EOL> def test_grid_columnconfigure_pad ( self ) : <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , pad = '<STR_LIT:foo>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , pad = - <NUM_LIT:3> ) <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , pad = <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , <NUM_LIT:3> ) <EOL> def test_grid_columnconfigure_uniform ( self ) : <EOL> self . root . grid_columnconfigure ( <NUM_LIT:0> , uniform = '<STR_LIT:foo>' ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , '<STR_LIT:foo>' ) <EOL> self . assertEqual ( self . root . grid_columnconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , '<STR_LIT:foo>' ) <EOL> def test_grid_rowconfigure ( self ) : <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_rowconfigure ( ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> ) , <EOL> { '<STR_LIT>' : <NUM_LIT:0> , '<STR_LIT>' : <NUM_LIT:0> , '<STR_LIT>' : None , '<STR_LIT>' : <NUM_LIT:0> } ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT:foo>' ) <EOL> self . root . grid_rowconfigure ( ( <NUM_LIT:0> , <NUM_LIT:3> ) , weight = <NUM_LIT:2> ) <EOL> with self . assertRaisesRegexp ( TclError , <EOL> '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( ( <NUM_LIT:0> , <NUM_LIT:3> ) ) <EOL> b = tkinter . Button ( self . root ) <EOL> b . grid_configure ( column = <NUM_LIT:0> , row = <NUM_LIT:0> ) <EOL> if tcl_version >= ( <NUM_LIT:8> , <NUM_LIT:5> ) : <EOL> self . root . grid_rowconfigure ( '<STR_LIT:all>' , weight = <NUM_LIT:3> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( '<STR_LIT:all>' ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:3> , '<STR_LIT>' ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT> , '<STR_LIT>' ) , <NUM_LIT:0> ) <EOL> if tcl_version >= ( <NUM_LIT:8> , <NUM_LIT:5> ) : <EOL> self . root . grid_rowconfigure ( b , weight = <NUM_LIT:4> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:4> ) <EOL> def test_grid_rowconfigure_minsize ( self ) : <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , minsize = '<STR_LIT:foo>' ) <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , minsize = <NUM_LIT:10> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:10> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , <NUM_LIT:10> ) <EOL> def test_grid_rowconfigure_weight ( self ) : <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , weight = '<STR_LIT>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , weight = - <NUM_LIT:3> ) <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , weight = <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , <NUM_LIT:3> ) <EOL> def test_grid_rowconfigure_pad ( self ) : <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , pad = '<STR_LIT:foo>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' <EOL> '<STR_LIT>' ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , pad = - <NUM_LIT:3> ) <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , pad = <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , <NUM_LIT:3> ) <EOL> def test_grid_rowconfigure_uniform ( self ) : <EOL> self . root . grid_rowconfigure ( <NUM_LIT:0> , uniform = '<STR_LIT:foo>' ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> , '<STR_LIT>' ) , '<STR_LIT:foo>' ) <EOL> self . assertEqual ( self . root . grid_rowconfigure ( <NUM_LIT:0> ) [ '<STR_LIT>' ] , '<STR_LIT:foo>' ) <EOL> def test_grid_forget ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> c = tkinter . Button ( self . root ) <EOL> b . grid_configure ( row = <NUM_LIT:2> , column = <NUM_LIT:2> , rowspan = <NUM_LIT:2> , columnspan = <NUM_LIT:2> , <EOL> padx = <NUM_LIT:3> , pady = <NUM_LIT:4> , sticky = '<STR_LIT>' ) <EOL> self . assertEqual ( self . root . grid_slaves ( ) , [ b ] ) <EOL> b . grid_forget ( ) <EOL> c . grid_forget ( ) <EOL> self . assertEqual ( self . root . grid_slaves ( ) , [ ] ) <EOL> self . assertEqual ( b . grid_info ( ) , { } ) <EOL> b . grid_configure ( row = <NUM_LIT:0> , column = <NUM_LIT:0> ) <EOL> info = b . grid_info ( ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:1> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_grid_remove ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> c = tkinter . Button ( self . root ) <EOL> b . grid_configure ( row = <NUM_LIT:2> , column = <NUM_LIT:2> , rowspan = <NUM_LIT:2> , columnspan = <NUM_LIT:2> , <EOL> padx = <NUM_LIT:3> , pady = <NUM_LIT:4> , sticky = '<STR_LIT>' ) <EOL> self . assertEqual ( self . root . grid_slaves ( ) , [ b ] ) <EOL> b . grid_remove ( ) <EOL> c . grid_remove ( ) <EOL> self . assertEqual ( self . root . grid_slaves ( ) , [ ] ) <EOL> self . assertEqual ( b . grid_info ( ) , { } ) <EOL> b . grid_configure ( row = <NUM_LIT:0> , column = <NUM_LIT:0> ) <EOL> info = b . grid_info ( ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:0> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:3> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:4> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_grid_info ( self ) : <EOL> b = tkinter . Button ( self . root ) <EOL> self . assertEqual ( b . grid_info ( ) , { } ) <EOL> b . grid_configure ( row = <NUM_LIT:2> , column = <NUM_LIT:2> , rowspan = <NUM_LIT:2> , columnspan = <NUM_LIT:2> , <EOL> padx = <NUM_LIT:3> , pady = <NUM_LIT:4> , sticky = '<STR_LIT>' ) <EOL> info = b . grid_info ( ) <EOL> self . assertIsInstance ( info , dict ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . root ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:2> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:3> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , self . _str ( <NUM_LIT:4> ) ) <EOL> self . assertEqual ( info [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_grid_bbox ( self ) : <EOL> self . assertEqual ( self . root . grid_bbox ( ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( self . root . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( self . root . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_bbox ( '<STR_LIT:x>' , <NUM_LIT:0> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_bbox ( <NUM_LIT:0> , '<STR_LIT:x>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT:x>' , <NUM_LIT:0> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT:x>' ) <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> t = self . root <EOL> t . wm_geometry ( '<STR_LIT>' ) <EOL> t . wm_geometry ( '<STR_LIT>' ) <EOL> f1 = tkinter . Frame ( t , width = <NUM_LIT> , height = <NUM_LIT> , bg = '<STR_LIT>' ) <EOL> f2 = tkinter . Frame ( t , width = <NUM_LIT> , height = <NUM_LIT> , bg = '<STR_LIT>' ) <EOL> f1 . grid_configure ( row = <NUM_LIT:0> , column = <NUM_LIT:0> ) <EOL> f2 . grid_configure ( row = <NUM_LIT:1> , column = <NUM_LIT:1> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( t . grid_bbox ( ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> self . assertEqual ( t . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> self . assertEqual ( t . grid_bbox ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> self . assertEqual ( t . grid_bbox ( <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> self . assertEqual ( t . grid_bbox ( <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> self . assertEqual ( t . grid_bbox ( - <NUM_LIT:2> , - <NUM_LIT:2> , - <NUM_LIT:1> , - <NUM_LIT:1> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_bbox ( <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:12> , <NUM_LIT:12> ) , ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> def test_grid_location ( self ) : <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_location ( ) <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_location ( <NUM_LIT:0> ) <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_location ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_location ( '<STR_LIT:x>' , '<STR_LIT:y>' ) <EOL> with self . assertRaisesRegexp ( TclError , '<STR_LIT>' ) : <EOL> self . root . grid_location ( '<STR_LIT>' , '<STR_LIT:y>' ) <EOL> t = self . root <EOL> t . wm_geometry ( '<STR_LIT>' ) <EOL> t . wm_geometry ( '<STR_LIT>' ) <EOL> f = tkinter . Frame ( t , width = <NUM_LIT:200> , height = <NUM_LIT:100> , <EOL> highlightthickness = <NUM_LIT:0> , bg = '<STR_LIT>' ) <EOL> self . assertEqual ( f . grid_location ( <NUM_LIT:10> , <NUM_LIT:10> ) , ( - <NUM_LIT:1> , - <NUM_LIT:1> ) ) <EOL> f . grid_configure ( ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( t . grid_location ( - <NUM_LIT:10> , - <NUM_LIT:10> ) , ( - <NUM_LIT:1> , - <NUM_LIT:1> ) ) <EOL> self . assertEqual ( t . grid_location ( - <NUM_LIT:10> , <NUM_LIT:0> ) , ( - <NUM_LIT:1> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_location ( - <NUM_LIT:1> , <NUM_LIT:0> ) , ( - <NUM_LIT:1> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT:0> , - <NUM_LIT:10> ) , ( <NUM_LIT:0> , - <NUM_LIT:1> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT:0> , - <NUM_LIT:1> ) , ( <NUM_LIT:0> , - <NUM_LIT:1> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT:200> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT> , <NUM_LIT:0> ) , ( <NUM_LIT:1> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT:0> , <NUM_LIT:100> ) , ( <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT:0> , <NUM_LIT> ) , ( <NUM_LIT:0> , <NUM_LIT:1> ) ) <EOL> self . assertEqual ( t . grid_location ( <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> def test_grid_propagate ( self ) : <EOL> self . assertEqual ( self . root . grid_propagate ( ) , True ) <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_propagate ( False , False ) <EOL> self . root . grid_propagate ( False ) <EOL> self . assertFalse ( self . root . grid_propagate ( ) ) <EOL> f = tkinter . Frame ( self . root , width = <NUM_LIT:100> , height = <NUM_LIT:100> , bg = '<STR_LIT>' ) <EOL> f . grid_configure ( row = <NUM_LIT:0> , column = <NUM_LIT:0> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f . winfo_width ( ) , <NUM_LIT:100> ) <EOL> self . assertEqual ( f . winfo_height ( ) , <NUM_LIT:100> ) <EOL> f . grid_propagate ( False ) <EOL> g = tkinter . Frame ( self . root , width = <NUM_LIT> , height = <NUM_LIT> , bg = '<STR_LIT>' ) <EOL> g . grid_configure ( in_ = f , row = <NUM_LIT:0> , column = <NUM_LIT:0> ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f . winfo_width ( ) , <NUM_LIT:100> ) <EOL> self . assertEqual ( f . winfo_height ( ) , <NUM_LIT:100> ) <EOL> f . grid_propagate ( True ) <EOL> self . root . update ( ) <EOL> self . assertEqual ( f . winfo_width ( ) , <NUM_LIT> ) <EOL> self . assertEqual ( f . winfo_height ( ) , <NUM_LIT> ) <EOL> def test_grid_size ( self ) : <EOL> with self . assertRaises ( TypeError ) : <EOL> self . root . grid_size ( <NUM_LIT:0> ) <EOL> self . assertEqual ( self . root . grid_size ( ) , ( <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> f = tkinter . Scale ( self . root ) <EOL> f . grid_configure ( row = <NUM_LIT:0> , column = <NUM_LIT:0> ) <EOL> self . assertEqual ( self . root . grid_size ( ) , ( <NUM_LIT:1> , <NUM_LIT:1> ) ) <EOL> f . grid_configure ( row = <NUM_LIT:4> , column = <NUM_LIT:5> ) <EOL> self . assertEqual ( self . root . grid_size ( ) , ( <NUM_LIT:6> , <NUM_LIT:5> ) ) <EOL> def test_grid_slaves ( self ) : <EOL> self . assertEqual ( self . root . grid_slaves ( ) , [ ] ) <EOL> a = tkinter . Label ( self . root ) <EOL> a . grid_configure ( row = <NUM_LIT:0> , column = <NUM_LIT:1> ) <EOL> b = tkinter . Label ( self . root ) <EOL> b . grid_configure ( row = <NUM_LIT:1> , column = <NUM_LIT:0> ) <EOL> c = tkinter . Label ( self . root ) <EOL> c . grid_configure ( row = <NUM_LIT:1> , column = <NUM_LIT:1> ) <EOL> d = tkinter . Label ( self . root ) <EOL> d . grid_configure ( row = <NUM_LIT:1> , column = <NUM_LIT:1> ) <EOL> self . assertEqual ( self . root . grid_slaves ( ) , [ d , c , b , a ] ) <EOL> self . assertEqual ( self . root . grid_slaves ( row = <NUM_LIT:0> ) , [ a ] ) <EOL> self . assertEqual ( self . root . grid_slaves ( row = <NUM_LIT:1> ) , [ d , c , b ] ) <EOL> self . assertEqual ( self . root . grid_slaves ( column = <NUM_LIT:0> ) , [ b ] ) <EOL> self . assertEqual ( self . root . grid_slaves ( column = <NUM_LIT:1> ) , [ d , c , a ] ) <EOL> self . assertEqual ( self . root . grid_slaves ( row = <NUM_LIT:1> , column = <NUM_LIT:1> ) , [ d , c ] ) <EOL> tests_gui = ( <EOL> PackTest , PlaceTest , GridTest , <EOL> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> run_unittest ( * tests_gui ) </s>
