webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __init__ (self, float_value, places=7) |
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) |
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 |
|||
) |
Initialize IsAlmost. Args: float_value: The value for making the comparison. places: The number of decimal places to round to.
def mox.IsAlmost.__repr__ | ( | self | ) |
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