#NEWLINE# def test_method_predicate( ) : #NEWLINE# #INDENT# class SomeClass ( object ) : #NEWLINE# #INDENT# def some_method( self , arg1 , arg2 ) : #NEWLINE# #INDENT# return ( arg1 == arg2 ) #NEWLINE# #UNINDENT# #UNINDENT# obj = SomeClass ( ) #NEWLINE# p = Predicate ( p . some_method ) #NEWLINE# assert ( p . name == 'some_method' ) #NEWLINE# assert ( p . num_args == 2 ) #NEWLINE# assert p ( 2 , 2 )