#NEWLINE# def test_subtract( self ) : #NEWLINE# #INDENT# f = formula . interactions ( [ formula . Term ( l ) for l in [ 'a' , 'b' , 'c' ] ] ) #NEWLINE# ff = ( f - f [ 'a*b' ] ) #NEWLINE# assert_equal ( set ( ff . termnames ( ) ) , set ( [ 'a' , 'b' , 'c' , 'a*c' , 'b*c' ] ) ) #NEWLINE# ff = ( ( f - f [ 'a*b' ] ) - f [ 'a*c' ] ) #NEWLINE# assert_equal ( set ( ff . termnames ( ) ) , set ( [ 'a' , 'b' , 'c' , 'b*c' ] ) ) #NEWLINE# ff = ( f - ( f [ 'a*b' ] + f [ 'a*c' ] ) ) #NEWLINE# assert_equal ( set ( ff . termnames ( ) ) , set ( [ 'a' , 'b' , 'c' , 'b*c' ] ) )