Public Member Functions | |
def | __init__ (self, float_value, places=7) |
def | __init__ (self, float_value, places=7) |
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 | |
_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)))
Definition at line 828 of file bloaty/third_party/protobuf/python/mox.py.
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.
Definition at line 835 of file bloaty/third_party/protobuf/python/mox.py.
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.
Definition at line 835 of file protobuf/python/mox.py.
def mox.IsAlmost.__repr__ | ( | self | ) |
Definition at line 862 of file bloaty/third_party/protobuf/python/mox.py.
def mox.IsAlmost.__repr__ | ( | self | ) |
Definition at line 862 of file protobuf/python/mox.py.
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.
Definition at line 846 of file protobuf/python/mox.py.
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.
Definition at line 846 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Definition at line 843 of file bloaty/third_party/protobuf/python/mox.py.
|
private |
Definition at line 844 of file bloaty/third_party/protobuf/python/mox.py.