mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-25 18:48:15 +00:00
tests: use larger grid to avoid rouding errors
This commit is contained in:
@@ -81,7 +81,7 @@ Feature: Address computation
|
|||||||
| W1 | W11 |
|
| W1 | W11 |
|
||||||
|
|
||||||
Scenario: Locality points should contain all boundaries they touch
|
Scenario: Locality points should contain all boundaries they touch
|
||||||
Given the grid
|
Given the 0.001 grid
|
||||||
| 1 | | | 2 | | 3 |
|
| 1 | | | 2 | | 3 |
|
||||||
| | | | 8 | | |
|
| | | | 8 | | |
|
||||||
| 4 | | | 5 | | 6 |
|
| 4 | | | 5 | | 6 |
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import random
|
|||||||
import os
|
import os
|
||||||
from nose.tools import * # for assert functions
|
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):
|
def define_node_grid(context, grid_step):
|
||||||
"""
|
"""
|
||||||
Define a grid of node positions.
|
Define a grid of node positions.
|
||||||
"""
|
"""
|
||||||
if grid_step is not None:
|
if grid_step is not None:
|
||||||
grid_step = int(grd_step.strip())
|
grid_step = float(grid_step.strip())
|
||||||
else:
|
else:
|
||||||
grid_step = 0.00001
|
grid_step = 0.00001
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user