X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/925195725dfcb7f1a6795c50244c1df6cb7242ce..834ae0a93f2f25b3231f4c47612ac1d2c170738a:/test/python/test_tokenizer_icu.py diff --git a/test/python/test_tokenizer_icu.py b/test/python/test_tokenizer_icu.py index 5ec434b6..b7101c3f 100644 --- a/test/python/test_tokenizer_icu.py +++ b/test/python/test_tokenizer_icu.py @@ -67,13 +67,10 @@ def analyzer(tokenizer_factory, test_config, monkeypatch, def _mk_analyser(norm=("[[:Punctuation:][:Space:]]+ > ' '",), trans=(':: upper()',), variants=('~gasse -> gasse', 'street => st', )): - cfgfile = tmp_path / 'analyser_test_config.yaml' - with cfgfile.open('w') as stream: - cfgstr = {'normalization' : list(norm), - 'transliteration' : list(trans), - 'variants' : [ {'words': list(variants)}]} - yaml.dump(cfgstr, stream) - tok.naming_rules = ICUNameProcessorRules(loader=ICURuleLoader(cfgfile)) + cfgstr = {'normalization' : list(norm), + 'transliteration' : list(trans), + 'variants' : [ {'words': list(variants)}]} + tok.naming_rules = ICUNameProcessorRules(loader=ICURuleLoader(cfgstr)) return tok.name_analyzer()