]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/steps/check_functions.py
replace nose assertions with simple asserts
[nominatim.git] / test / bdd / steps / check_functions.py
1 """
2 Collection of assertion functions used for the steps.
3 """
4
5 class Almost:
6
7     def __init__(self, value, offset=0.00001):
8         self.value = value
9         self.offset = offset
10
11     def __eq__(self, other):
12         return abs(other - self.value) < self.offset