<s> from unittest import TestCase <EOL> from muntjac . ui . grid_layout import GridLayout <EOL> from muntjac . ui . label import Label <EOL> class TestGridLayoutLastRowRemoval ( TestCase ) : <EOL> def testRemovingLastRow ( self ) : <EOL> grid = GridLayout ( <NUM_LIT:2> , <NUM_LIT:1> ) <EOL> grid . addComponent ( Label ( '<STR_LIT>' ) ) <EOL> grid . addComponent ( Label ( '<STR_LIT>' ) ) <EOL> try : <EOL> grid . removeRow ( <NUM_LIT:0> ) <EOL> except ValueError : <EOL> self . fail ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> self . assertEquals ( <NUM_LIT:2> , grid . getColumns ( ) ) <EOL> self . assertEquals ( <NUM_LIT:1> , grid . getRows ( ) ) <EOL> self . assertEquals ( grid . getComponent ( <NUM_LIT:0> , <NUM_LIT:0> ) , None , <EOL> '<STR_LIT>' ) <EOL> self . assertEquals ( grid . getComponent ( <NUM_LIT:1> , <NUM_LIT:0> ) , None , <EOL> '<STR_LIT>' ) <EOL> self . assertEquals ( <NUM_LIT:0> , grid . getCursorX ( ) ) <EOL> self . assertEquals ( <NUM_LIT:0> , grid . getCursorY ( ) ) </s>
