#NEWLINE# def test_branch_true_dead( self ) : #NEWLINE# #INDENT# 'Test branch with the false branch being dead' #NEWLINE# t = ast . Constant ( True ) #NEWLINE# f = ast . Constant ( False ) #NEWLINE# l = ast . Literal ( 'foo' ) #NEWLINE# v = ast . Number ( 42 ) #NEWLINE# cmp = ast . CompareOperator ( '=' , l , v ) #NEWLINE# n = ast . Branch ( f , t , cmp ) #NEWLINE# ( c , r ) = optimizer . optimization_pass ( n ) #NEWLINE# assert ( c == 1 ) #NEWLINE# assert ( r is cmp )