Public Member Functions | |
def | __init__ (self, float_value, places=7) |
def | __repr__ (self) |
def | equals (self, rhs) |
![]() | |
def | __eq__ (self, rhs) |
def | __ne__ (self, rhs) |
Private Attributes | |
_float_value | |
_places | |
Comparison class used to check whether a parameter is nearly equal to a given value. Generally useful for floating point numbers. Example mock_dao.SetTimeout((IsAlmost(3.9)))
def mox.IsAlmost.__init__ | ( | self, | |
float_value, | |||
places = 7 |
|||
) |
def mox.IsAlmost.equals | ( | self, | |
rhs | |||
) |
Check to see if RHS is almost equal to float_value Args: rhs: the value to compare to float_value Returns: bool
Reimplemented from mox.Comparator.