#NEWLINE# def test_two_sided( self ) : #NEWLINE# #INDENT# np . random . seed ( 0 ) #NEWLINE# obs = mantel ( self . minx , self . minx , method = 'spearman' , alternative = 'two-sided' ) #NEWLINE# self . assertEqual ( obs [ 0 ] , 1 ) #NEWLINE# self . assertAlmostEqual ( obs [ 1 ] , 0.328 ) #NEWLINE# self . assertEqual ( obs [ 2 ] , 3 ) #NEWLINE# obs = mantel ( self . minx , self . miny , method = 'spearman' , alternative = 'two-sided' ) #NEWLINE# self . assertAlmostEqual ( obs [ 0 ] , 0.5 ) #NEWLINE# self . assertAlmostEqual ( obs [ 1 ] , 1.0 ) #NEWLINE# self . assertEqual ( obs [ 2 ] , 3 ) #NEWLINE# obs = mantel ( self . minx , self . minz , method = 'spearman' , alternative = 'two-sided' ) #NEWLINE# self . assertAlmostEqual ( obs [ 0 ] , ( - 1 ) ) #NEWLINE# self . assertAlmostEqual ( obs [ 1 ] , 0.322 ) #NEWLINE# self . assertEqual ( obs [ 2 ] , 3 )