X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/118858a55e5ec522d870842532d26ff0276c85ba..779ea8ac624187850752544eae0209f811bc1551:/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()