]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/api/search/test_postcode_parser.py
enable flake for Python tests
[nominatim.git] / test / python / api / search / test_postcode_parser.py
index 284aba5b932b3c96bb60187f003da3402fe18561..38638e075f53e1d816e0cafcd8d4813d8707966b 100644 (file)
@@ -16,6 +16,7 @@ import pytest
 from nominatim_api.search.postcode_parser import PostcodeParser
 from nominatim_api.search.query import QueryStruct, PHRASE_ANY, PHRASE_POSTCODE, PHRASE_STREET
 
+
 @pytest.fixture
 def pc_config(project_env):
     country_file = project_env.project_dir / 'country_settings.yaml'
@@ -55,6 +56,7 @@ ky:
 
     return project_env
 
+
 def mk_query(inp):
     query = QueryStruct([])
     phrase_split = re.split(r"([ ,:'-])", inp)
@@ -80,6 +82,7 @@ def test_simple_postcode(pc_config, query, pos):
 
     assert result == {(pos, pos + 1, '45325'), (pos, pos + 1, '453 25')}
 
+
 def test_contained_postcode(pc_config):
     parser = PostcodeParser(pc_config)
 
@@ -87,7 +90,6 @@ def test_contained_postcode(pc_config):
                                                   (0, 2, '12345 DX')}
 
 
-
 @pytest.mark.parametrize('query,frm,to', [('345987', 0, 1), ('345 987', 0, 2),
                                           ('Aina 345 987', 1, 3),
                                           ('Aina 23 345 987 ff', 2, 4)])
@@ -98,6 +100,7 @@ def test_postcode_with_space(pc_config, query, frm, to):
 
     assert result == {(frm, to, '345987')}
 
+
 def test_overlapping_postcode(pc_config):
     parser = PostcodeParser(pc_config)
 
@@ -131,6 +134,7 @@ def test_postcode_with_non_matching_country_prefix(pc_config):
 
     assert not parser.parse(mk_query('ky12233'))
 
+
 def test_postcode_inside_postcode_phrase(pc_config):
     parser = PostcodeParser(pc_config)