Public Member Functions | |
def | __init__ (self, func) |
def | __init__ (self, func) |
def | __repr__ (self) |
def | __repr__ (self) |
def | equals (self, rhs) |
def | equals (self, rhs) |
![]() | |
def | __eq__ (self, rhs) |
def | __eq__ (self, rhs) |
def | __ne__ (self, rhs) |
def | __ne__ (self, rhs) |
Private Attributes | |
_func | |
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)
Definition at line 1112 of file bloaty/third_party/protobuf/python/mox.py.
def mox.Func.__init__ | ( | self, | |
func | |||
) |
Initialize. Args: func: callable that takes one parameter and returns a bool
Definition at line 1129 of file bloaty/third_party/protobuf/python/mox.py.
def mox.Func.__init__ | ( | self, | |
func | |||
) |
Initialize. Args: func: callable that takes one parameter and returns a bool
Definition at line 1129 of file protobuf/python/mox.py.
def mox.Func.__repr__ | ( | self | ) |
Definition at line 1152 of file bloaty/third_party/protobuf/python/mox.py.
def mox.Func.__repr__ | ( | self | ) |
Definition at line 1152 of file protobuf/python/mox.py.
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)
Reimplemented from mox.Comparator.
Definition at line 1138 of file protobuf/python/mox.py.
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)
Reimplemented from mox.Comparator.
Definition at line 1138 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Definition at line 1136 of file bloaty/third_party/protobuf/python/mox.py.