From 93d5be097a338b0333ecf2452b0a7311cf061bff Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 22 Jun 2022 10:47:08 +0200 Subject: [PATCH] bdd: do not expect legacy word table to be without empty tokens It can happen for bogus names and this will not get fixed anymore. --- test/bdd/steps/steps_db_ops.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/bdd/steps/steps_db_ops.py b/test/bdd/steps/steps_db_ops.py index 37d54153..8fd918f8 100644 --- a/test/bdd/steps/steps_db_ops.py +++ b/test/bdd/steps/steps_db_ops.py @@ -27,8 +27,9 @@ def check_database_integrity(context): assert cur.fetchone()[0] == 0, "Duplicates found in place_addressline" # word table must not have empty word_tokens - cur.execute("SELECT count(*) FROM word WHERE word_token = ''") - assert cur.fetchone()[0] == 0, "Empty word tokens found in word table" + if context.nominatim.tokenizer != 'legacy': + cur.execute("SELECT count(*) FROM word WHERE word_token = ''") + assert cur.fetchone()[0] == 0, "Empty word tokens found in word table" -- 2.45.1