#NEWLINE# def test_flatten( self ) : #NEWLINE# #INDENT# ( x , y , z ) = inputs ( ) #NEWLINE# C = Composite ( [ x , y ] , [ ( x + y ) ] ) #NEWLINE# CC = Composite ( [ x , y ] , [ C ( ( x * y ) , y ) ] ) #NEWLINE# assert ( not isinstance ( CC . outputs [ 0 ] . owner . op , Composite ) ) #NEWLINE# CC = Composite ( [ x , y , z ] , [ C ( ( x * y ) , y ) , C ( ( x * z ) , y ) ] ) #NEWLINE# assert isinstance ( z . outputs [ 0 ] . owner . op , Composite )