Zach Moshe created BEAM-6035:
--------------------------------

             Summary: Add beam.testing.util.almost_equal_to
                 Key: BEAM-6035
                 URL: https://issues.apache.org/jira/browse/BEAM-6035
             Project: Beam
          Issue Type: Improvement
          Components: testing
            Reporter: Zach Moshe
            Assignee: Jason Kuster


Similar to Python's unittest module, can we have a 'almost_equal_to()' matcher 
to allow for comparing floats?

Suggested definition:
def almost_equal_to(expected, delta=1e-6):
   ...

Does that make sense or a better approach would be to allow overriding of the 
default comparison of 'sorted_expected' and 'sorted_actual' in 'equal_to()'?




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to