switch tests to ICU tokenizer as default

This commit is contained in:
Sarah Hoffmann
2022-05-10 14:54:50 +02:00
parent b93ef23d3f
commit adeebec32a
8 changed files with 13 additions and 12 deletions

View File

@@ -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")

View File

@@ -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:

View File

@@ -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: