mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
switch tests to ICU tokenizer as default
This commit is contained in:
@@ -59,5 +59,5 @@ def after_scenario(context, scenario):
|
||||
|
||||
def before_tag(context, tag):
|
||||
if tag == 'fail-legacy':
|
||||
if context.config.userdata['TOKENIZER'] in (None, 'legacy'):
|
||||
if context.config.userdata['TOKENIZER'] == 'legacy':
|
||||
context.scenario.skip("Not implemented in legacy tokenizer")
|
||||
|
||||
@@ -207,7 +207,7 @@ class NominatimEnvironment:
|
||||
self.run_nominatim('add-data', '--tiger-data', str((testdata / 'tiger').resolve()))
|
||||
self.run_nominatim('freeze')
|
||||
|
||||
if self.tokenizer != 'icu':
|
||||
if self.tokenizer == 'legacy':
|
||||
phrase_file = str((testdata / 'specialphrases_testdb.sql').resolve())
|
||||
run_script(['psql', '-d', self.api_test_db, '-f', phrase_file])
|
||||
else:
|
||||
|
||||
@@ -266,7 +266,7 @@ def check_word_table_for_postcodes(context, exclude, postcodes):
|
||||
plist.sort()
|
||||
|
||||
with context.db.cursor(cursor_factory=psycopg2.extras.DictCursor) as cur:
|
||||
if nctx.tokenizer == 'icu':
|
||||
if nctx.tokenizer != 'legacy':
|
||||
cur.execute("SELECT word FROM word WHERE type = 'P' and word = any(%s)",
|
||||
(plist,))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user