#NEWLINE# def _test_comparator( self , pyfunc ) : #NEWLINE# #INDENT# cfunc = jit ( nopython = True ) ( pyfunc ) #NEWLINE# def check( a , b ) : #NEWLINE# #INDENT# self . assertPreciseEqual ( pyfunc ( a , b ) , cfunc ( a , b ) ) #NEWLINE# #UNINDENT# ( a , b ) = map ( set , [ ( 1 , 2 , 4 , 11 ) , ( 2 , 3 , 5 , 11 , 42 ) ] ) #NEWLINE# args = [ ( a & b ) , ( a - b ) , ( a | b ) , ( a ^ b ) ] #NEWLINE# args = [ tuple ( x ) for x in args ] #NEWLINE# for ( a , b ) in itertools . product ( args , args ) : #NEWLINE# #INDENT# check ( a , b )