From d730e179bf248cbf5f46da41d05f0c92ac2cbc69 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 22 Aug 2020 16:04:24 +0200 Subject: [PATCH 1/1] tests: use larger grid to avoid rouding errors --- test/bdd/db/import/addressing.feature | 2 +- test/bdd/steps/osm_data.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/bdd/db/import/addressing.feature b/test/bdd/db/import/addressing.feature index ddb7b438..2fdd2812 100644 --- a/test/bdd/db/import/addressing.feature +++ b/test/bdd/db/import/addressing.feature @@ -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 | diff --git a/test/bdd/steps/osm_data.py b/test/bdd/steps/osm_data.py index 122b2461..bb146ce4 100644 --- a/test/bdd/steps/osm_data.py +++ b/test/bdd/steps/osm_data.py @@ -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 -- 2.39.5