mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
remove old behave osm2pgsql BDD tests
This commit is contained in:
@@ -10,7 +10,6 @@ Helper functions to compare expected values.
|
||||
import json
|
||||
import re
|
||||
import math
|
||||
import itertools
|
||||
|
||||
from psycopg import sql as pysql
|
||||
from psycopg.rows import dict_row, tuple_row
|
||||
@@ -152,18 +151,16 @@ class ResultAttr:
|
||||
ccode = geom[8:].upper()
|
||||
assert ccode in ALIASES, f"Geometry error: unknown country {ccode}"
|
||||
return m[1] == 'POINT' and \
|
||||
all(math.isclose(p1, p2) for p1, p2 in
|
||||
zip(converted[0], ALIASES[ccode]))
|
||||
all(math.isclose(p1, p2) for p1, p2 in zip(converted[0], ALIASES[ccode]))
|
||||
|
||||
if ',' not in expected:
|
||||
return m[1] == 'POINT' and \
|
||||
all(math.isclose(p1, p2) for p1, p2 in
|
||||
zip(converted[0], self.get_point(expected)))
|
||||
all(math.isclose(p1, p2) for p1, p2 in zip(converted[0], self.get_point(expected)))
|
||||
|
||||
if '(' not in expected:
|
||||
return m[1] == 'LINESTRING' and \
|
||||
all(math.isclose(p1[0], p2[0]) and math.isclose(p1[1], p2[1]) for p1, p2 in
|
||||
zip(converted, (self.get_point(p) for p in expected.split(','))))
|
||||
all(math.isclose(p1[0], p2[0]) and math.isclose(p1[1], p2[1]) for p1, p2 in
|
||||
zip(converted, (self.get_point(p) for p in expected.split(','))))
|
||||
|
||||
if m[1] != 'POLYGON':
|
||||
return False
|
||||
|
||||
@@ -18,6 +18,7 @@ from nominatim_db.tools.refresh import create_functions, load_address_levels_fro
|
||||
from nominatim_db.tools.exec_utils import run_osm2pgsql
|
||||
from nominatim_db.tokenizer import factory as tokenizer_factory
|
||||
|
||||
|
||||
class DBManager:
|
||||
|
||||
def __init__(self, purge=False):
|
||||
@@ -98,4 +99,3 @@ class DBManager:
|
||||
asyncio.run(create_search_indices(conn, config))
|
||||
|
||||
tokenizer_factory.create_tokenizer(config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user