webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __init__ (self, func) |
def | equals (self, rhs) |
def | __repr__ (self) |
Public Member Functions inherited from mox.Comparator | |
def | equals (self, rhs) |
def | __eq__ (self, rhs) |
def | __ne__ (self, rhs) |
Call a function that should verify the parameter passed in is correct. You may need the ability to perform more advanced operations on the parameter in order to validate it. You can use this to have a callable validate any parameter. The callable should return either True or False. Example: def myParamValidator(param): # Advanced logic here return True mock_dao.DoSomething(Func(myParamValidator), true)
def mox.Func.__init__ | ( | self, | |
func | |||
) |
Initialize. Args: func: callable that takes one parameter and returns a bool
def mox.Func.__repr__ | ( | self | ) |
def mox.Func.equals | ( | self, | |
rhs | |||
) |
Test whether rhs passes the function test. rhs is passed into func. Args: rhs: any python object Returns: the result of func(rhs)