mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
replace nose assertions with simple asserts
This commit is contained in:
12
test/bdd/steps/check_functions.py
Normal file
12
test/bdd/steps/check_functions.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
Collection of assertion functions used for the steps.
|
||||
"""
|
||||
|
||||
class Almost:
|
||||
|
||||
def __init__(self, value, offset=0.00001):
|
||||
self.value = value
|
||||
self.offset = offset
|
||||
|
||||
def __eq__(self, other):
|
||||
return abs(other - self.value) < self.offset
|
||||
Reference in New Issue
Block a user