<s> """<STR_LIT>""" <EOL> from twisted . trial . unittest import TestCase <EOL> from twisted . conch . insults . window import TopWindow <EOL> class TopWindowTests ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_paintScheduling ( self ) : <EOL> """<STR_LIT>""" <EOL> paints = [ ] <EOL> scheduled = [ ] <EOL> root = TopWindow ( lambda : paints . append ( None ) , scheduled . append ) <EOL> self . assertEqual ( paints , [ ] ) <EOL> self . assertEqual ( scheduled , [ ] ) <EOL> root . repaint ( ) <EOL> self . assertEqual ( paints , [ ] ) <EOL> self . assertEqual ( len ( scheduled ) , <NUM_LIT:1> ) <EOL> root . repaint ( ) <EOL> self . assertEqual ( paints , [ ] ) <EOL> self . assertEqual ( len ( scheduled ) , <NUM_LIT:1> ) <EOL> scheduled . pop ( ) ( ) <EOL> self . assertEqual ( len ( paints ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( scheduled , [ ] ) <EOL> root . repaint ( ) <EOL> self . assertEqual ( len ( paints ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( len ( scheduled ) , <NUM_LIT:1> ) </s>
