test for cell-per-line format

This commit is contained in:
Ayush Dhar Dubey
2025-12-07 22:36:50 +05:30
parent 56cb183c4e
commit 4919240377
2 changed files with 4 additions and 2 deletions

View File

@@ -203,7 +203,7 @@ def test_import_phrases(monkeypatch, temp_db_cursor, def_config, sp_importer,
placex_table.add(cls='amenity', typ='animal_shelter') # in db for special phrase filtering
sp_importer.import_phrases(tokenizer, should_replace)
assert len(tokenizer.analyser_cache['special_phrases']) == 18
assert len(tokenizer.analyser_cache['special_phrases']) == 19
assert check_table_exist(temp_db_cursor, class_test, type_test)
assert check_placeid_and_centroid_indexes(temp_db_cursor, class_test, type_test)

View File

@@ -54,4 +54,6 @@ def test_generate_phrases(sp_wiki_loader):
('Water near', 'amenity', 'drinking_water', 'near'),
('Embassy', 'amenity', 'embassy', '-'),
('Embassys', 'amenity', 'embassy', '-'),
('Embassies', 'amenity', 'embassy', '-')}
('Embassies', 'amenity', 'embassy', '-'),
# test for one-cell-per-line format
('Coworkings near', 'amenity', 'coworking_space', 'near')}