def assertAlmostEqual(self, first, second, places=None, msg=None, delta=None):
if first == second:<EOL><INDENT>return<EOL><DEDENT>if delta is not None and places is not None:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>if delta is not None:<EOL><INDENT>if abs(first - second) <= delta:<EOL><INDENT>return<EOL><DEDENT>standardMsg = '<STR_LIT>' % (safe_repr(first), <EOL>safe_repr(second), <EOL>safe_repr(delta))<EOL><DEDENT>else:<EOL><INDENT>if places is None:<EOL><INDENT>places = <NUM_LIT:7><EOL><DEDENT>if round(abs(second-first), places) == <NUM_LIT:0>:<EOL><INDENT>return<EOL><DEDENT>standardMsg = '<STR_LIT>' % (safe_repr(first), <EOL>safe_repr(second), <EOL>places)<EOL><DEDENT>msg = self._formatMessage(msg, standardMsg)<EOL>raise self.failureException(msg)<EOL>
Fail if the two objects are unequal as determined by their
           difference rounded to the given number of decimal places
           (default 7) and comparing to zero, or by comparing that the
           between the two objects is more than the given delta.

           Note that decimal places (from zero) are usually not the same
           as significant digits (measured from the most signficant digit).

           If the two objects compare equal then they will automatically
           compare almost equal.