#NEWLINE# def test_comparisons( self ) : #NEWLINE# #INDENT# p1 = tm . makePanel4D ( ) #NEWLINE# p2 = tm . makePanel4D ( ) #NEWLINE# tp = p1 . reindex ( labels = ( p1 . labels + [ 'foo' ] ) ) #NEWLINE# p = p1 [ p1 . labels [ 0 ] ] #NEWLINE# def test_comp( func ) : #NEWLINE# #INDENT# result = func ( p1 , p2 ) #NEWLINE# self . assert_numpy_array_equal ( result . values , func ( p1 . values , p2 . values ) ) #NEWLINE# self . assertRaises ( Exception , func , p1 , tp ) #NEWLINE# self . assertRaises ( Exception , func , p1 , p ) #NEWLINE# result3 = func ( self . panel4d , 0 ) #NEWLINE# self . assert_numpy_array_equal ( result3 . values , func ( self . panel4d . values , 0 ) ) #NEWLINE# #UNINDENT# test_comp ( operator . eq ) #NEWLINE# test_comp ( operator . ne ) #NEWLINE# test_comp ( operator . lt ) #NEWLINE# test_comp ( operator . gt ) #NEWLINE# test_comp ( operator . ge ) #NEWLINE# test_comp ( operator . le )