#NEWLINE# def test_contrast1( self ) : #NEWLINE# #INDENT# term = ( self . terms [ 0 ] + self . terms [ 2 ] ) #NEWLINE# c = contrast . Contrast ( term , self . formula ) #NEWLINE# col1 = self . formula . termcolumns ( self . terms [ 0 ] , dict = False ) #NEWLINE# col2 = self . formula . termcolumns ( self . terms [ 1 ] , dict = False ) #NEWLINE# test = [ ( [ 1 ] + ( [ 0 ] * 9 ) ) , ( ( ( [ 0 ] * 2 ) + [ 1 ] ) + ( [ 0 ] * 7 ) ) ] #NEWLINE# assert_almost_equal ( c . matrix , test )