]> git.openstreetmap.org Git - nominatim.git/commitdiff
tests: use larger grid to avoid rouding errors
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 22 Aug 2020 14:04:24 +0000 (16:04 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 22 Aug 2020 14:04:24 +0000 (16:04 +0200)
test/bdd/db/import/addressing.feature
test/bdd/steps/osm_data.py

index ddb7b438be69e1f7db5fddcdbff7c25c2d89d687..2fdd281286909c7db801708e266c1c5f1dc5d833 100644 (file)
@@ -81,7 +81,7 @@ Feature: Address computation
             | W1     | W11     |
 
     Scenario: Locality points should contain all boundaries they touch
-        Given the grid
+        Given the 0.001 grid
             | 1 |   |   | 2 |   | 3 |
             |   |   |   | 8 |   |   |
             | 4 |   |   | 5 |   | 6 |
index 122b246134281bc84e58c50022313f79f6b57d99..bb146ce4d1145f8016318b9e4773299f3e2d29a2 100644 (file)
@@ -4,13 +4,13 @@ import random
 import os
 from nose.tools import * # for assert functions
 
-@given(u'the (\d+ )?grid')
+@given(u'the ([0-9.]+ )?grid')
 def define_node_grid(context, grid_step):
     """
     Define a grid of node positions.
     """
     if grid_step is not None:
-        grid_step = int(grd_step.strip())
+        grid_step = float(grid_step.strip())
     else:
         grid_step = 0.00001