mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
@@ -120,7 +120,7 @@ Feature: Simple Tests
|
||||
| querystring | pub |
|
||||
| viewbox | 12,33,77,45.13 |
|
||||
|
||||
Scenario: Empty XML search with exluded place ids
|
||||
Scenario: Empty XML search with excluded place ids
|
||||
When sending xml search query "jghrleoxsbwjer"
|
||||
| exclude_place_ids |
|
||||
| 123,76,342565 |
|
||||
@@ -128,7 +128,7 @@ Feature: Simple Tests
|
||||
| attr | value |
|
||||
| exclude_place_ids | 123,76,342565 |
|
||||
|
||||
Scenario: Empty XML search with bad exluded place ids
|
||||
Scenario: Empty XML search with bad excluded place ids
|
||||
When sending xml search query "jghrleoxsbwjer"
|
||||
| exclude_place_ids |
|
||||
| , |
|
||||
|
||||
@@ -56,7 +56,7 @@ Feature: Address computation
|
||||
| N1 | R1 | True |
|
||||
| N1 | R2 | True |
|
||||
|
||||
Scenario: with boundaries of same rank the one with the closer centroid is prefered
|
||||
Scenario: with boundaries of same rank the one with the closer centroid is preferred
|
||||
Given the grid
|
||||
| 1 | | | 3 | | 5 |
|
||||
| | 9 | | | | |
|
||||
|
||||
@@ -21,7 +21,7 @@ class GeometryFactory:
|
||||
The function understands the following formats:
|
||||
|
||||
country:<country code>
|
||||
Point geoemtry guaranteed to be in the given country
|
||||
Point geometry guaranteed to be in the given country
|
||||
<P>
|
||||
Point geometry
|
||||
<P>,...,<P>
|
||||
@@ -50,7 +50,7 @@ class GeometryFactory:
|
||||
|
||||
def mk_wkt_point(self, point):
|
||||
""" Parse a point description.
|
||||
The point may either consist of 'x y' cooordinates or a number
|
||||
The point may either consist of 'x y' coordinates or a number
|
||||
that refers to a grid setup.
|
||||
"""
|
||||
geom = point.strip()
|
||||
|
||||
@@ -270,8 +270,8 @@ class NominatimEnvironment:
|
||||
self.db_drop_database(self.test_db)
|
||||
|
||||
def _reuse_or_drop_db(self, name):
|
||||
""" Check for the existance of the given DB. If reuse is enabled,
|
||||
then the function checks for existance and returns True if the
|
||||
""" Check for the existence of the given DB. If reuse is enabled,
|
||||
then the function checks for existnce and returns True if the
|
||||
database is already there. Otherwise an existing database is
|
||||
dropped and always false returned.
|
||||
"""
|
||||
|
||||
@@ -190,7 +190,7 @@ def delete_places(context, oids):
|
||||
def check_place_contents(context, table, exact):
|
||||
""" Check contents of place/placex tables. Each row represents a table row
|
||||
and all data must match. Data not present in the expected table, may
|
||||
be arbitry. The rows are identified via the 'object' column which must
|
||||
be arbitrary. The rows are identified via the 'object' column which must
|
||||
have an identifier of the form '<NRW><osm id>[:<class>]'. When multiple
|
||||
rows match (for example because 'class' was left out and there are
|
||||
multiple entries for the given OSM object) then all must match. All
|
||||
@@ -237,7 +237,7 @@ def check_place_has_entry(context, table, oid):
|
||||
def check_search_name_contents(context, exclude):
|
||||
""" Check contents of place/placex tables. Each row represents a table row
|
||||
and all data must match. Data not present in the expected table, may
|
||||
be arbitry. The rows are identified via the 'object' column which must
|
||||
be arbitrary. The rows are identified via the 'object' column which must
|
||||
have an identifier of the form '<NRW><osm id>[:<class>]'. All
|
||||
expected rows are expected to be present with at least one database row.
|
||||
"""
|
||||
@@ -286,7 +286,7 @@ def check_search_name_has_entry(context, oid):
|
||||
def check_location_postcode(context):
|
||||
""" Check full contents for location_postcode table. Each row represents a table row
|
||||
and all data must match. Data not present in the expected table, may
|
||||
be arbitry. The rows are identified via 'country' and 'postcode' columns.
|
||||
be arbitrary. The rows are identified via 'country' and 'postcode' columns.
|
||||
All rows must be present as excepted and there must not be additional
|
||||
rows.
|
||||
"""
|
||||
@@ -343,7 +343,7 @@ def check_word_table_for_postcodes(context, exclude, postcodes):
|
||||
def check_place_addressline(context):
|
||||
""" Check the contents of the place_addressline table. Each row represents
|
||||
a table row and all data must match. Data not present in the expected
|
||||
table, may be arbitry. The rows are identified via the 'object' column,
|
||||
table, may be arbitrary. The rows are identified via the 'object' column,
|
||||
representing the addressee and the 'address' column, representing the
|
||||
address item.
|
||||
"""
|
||||
@@ -410,7 +410,7 @@ def check_location_property_osmline(context, oid, neg):
|
||||
def check_place_contents(context, exact):
|
||||
""" Check contents of the interpolation table. Each row represents a table row
|
||||
and all data must match. Data not present in the expected table, may
|
||||
be arbitry. The rows are identified via the 'object' column which must
|
||||
be arbitrary. The rows are identified via the 'object' column which must
|
||||
have an identifier of the form '<osm id>[:<startnumber>]'. When multiple
|
||||
rows match (for example because 'startnumber' was left out and there are
|
||||
multiple entries for the given OSM object) then all must match. All
|
||||
|
||||
@@ -75,7 +75,7 @@ def define_node_grid(context, grid_step, origin):
|
||||
# TODO coordinate
|
||||
coords = origin.split(',')
|
||||
if len(coords) != 2:
|
||||
raise RuntimeError('Grid origin expects orgin with x,y coordinates.')
|
||||
raise RuntimeError('Grid origin expects origin with x,y coordinates.')
|
||||
origin = (float(coords[0]), float(coords[1]))
|
||||
elif origin in ALIASES:
|
||||
origin = ALIASES[origin]
|
||||
|
||||
@@ -23,7 +23,7 @@ API_OPTIONS = {'search'}
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_icu_tokenizer(apiobj):
|
||||
""" Setup the propoerties needed for using the ICU tokenizer.
|
||||
""" Setup the properties needed for using the ICU tokenizer.
|
||||
"""
|
||||
apiobj.add_data('properties',
|
||||
[{'property': 'tokenizer', 'value': 'icu'},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Tests for command line interface wrapper.
|
||||
|
||||
These tests just check that the various command line parameters route to the
|
||||
correct functionionality. They use a lot of monkeypatching to avoid executing
|
||||
correct functionality. They use a lot of monkeypatching to avoid executing
|
||||
the actual functions.
|
||||
"""
|
||||
import importlib
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Test for the command line interface wrapper admin subcommand.
|
||||
|
||||
These tests just check that the various command line parameters route to the
|
||||
correct functionionality. They use a lot of monkeypatching to avoid executing
|
||||
correct functionality. They use a lot of monkeypatching to avoid executing
|
||||
the actual functions.
|
||||
"""
|
||||
import pytest
|
||||
|
||||
Reference in New Issue
Block a user