#NEWLINE# def test_decorator_custom_name( ) : #NEWLINE# #INDENT# @ predicate ( 'foo' ) #NEWLINE# def mypred( ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# assert ( mypred . name == 'foo' ) #NEWLINE# assert ( mypred . num_args == 0 ) #NEWLINE# @ predicate ( name = 'bar' ) #NEWLINE# def myotherpred( ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# assert ( myotherpred . name == 'bar' ) #NEWLINE# assert ( myotherpred . num_args == 0 )