forked from hans/Nominatim
bdd: move import tests from scenes to grid descriptions
This commit is contained in:
@@ -69,7 +69,7 @@ def define_node_grid(context, grid_step, origin):
|
||||
coords = origin.split(',')
|
||||
if len(coords) != 2:
|
||||
raise RuntimeError('Grid origin expects orgin with x,y coordinates.')
|
||||
origin(float(coords[0]), float(coords[1]))
|
||||
origin = (float(coords[0]), float(coords[1]))
|
||||
elif origin in ALIASES:
|
||||
origin = ALIASES[origin]
|
||||
else:
|
||||
|
||||
@@ -157,7 +157,11 @@ class DBRow:
|
||||
ST_SetSRID('{geomtxt}'::geometry, 4326))""".format(**self.db_row))
|
||||
return cur.fetchone()[0]
|
||||
|
||||
x, y = expected.split(' ')
|
||||
if ' ' in expected:
|
||||
x, y = expected.split(' ')
|
||||
else:
|
||||
x, y = self.context.osm.grid_node(int(expected))
|
||||
|
||||
return Almost(float(x)) == self.db_row['cx'] and Almost(float(y)) == self.db_row['cy']
|
||||
|
||||
def _has_geometry(self, expected):
|
||||
|
||||
Reference in New Issue
Block a user