+@then("(?P<oid>\w+) expands to interpolation")
+def check_location_property_osmline(context, oid):
+ cur = context.db.cursor(cursor_factory=psycopg2.extras.DictCursor)
+ nid = NominatimID(oid)
+
+ eq_('W', nid.typ, "interpolation must be a way")
+
+ cur.execute("""SELECT *, ST_AsText(linegeo) as geomtxt
+ FROM location_property_osmline WHERE osm_id = %s""",
+ (nid.oid, ))
+
+ todo = list(range(len(list(context.table))))
+ for res in cur:
+ for i in todo:
+ row = context.table[i]
+ if (int(row['start']) == res['startnumber']
+ and int(row['end']) == res['endnumber']):
+ todo.remove(i)
+ break
+ else:
+ assert False, "Unexpected row %s" % (str(res))
+
+ for h in row.headings:
+ if h in ('start', 'end'):
+ continue
+ elif h == 'parent_place_id':
+ if row[h] == '0':
+ eq_(0, res[h])
+ elif row[h] == '-':
+ assert_is_none(res[h])
+ else:
+ eq_(NominatimID(row[h]).get_place_id(context.db.cursor()),
+ res[h])
+ else:
+ assert_db_column(res, h, row[h], context)
+
+ eq_(todo, [])
+