public
Description: cheat sheet repository for chit
Clone URL: git://github.com/robin/chitsheet.git
chitsheet / assert_in_delta.yml
100644 12 lines (7 sloc) 0.29 kb
1
2
3
4
5
6
7
8
9
10
11
12
---
assert_in_delta: |-
  # 'cheat assertions' for the rest
  
  assert_in_delta(expected_float, actual_float, delta, message="")
  
  Passes if expected_float and actual_float are equal within delta tolerance.
  
  Example:
  
    assert_in_delta 0.05, (50000.0 / 10**6), 0.00001