mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 10:57:58 +00:00
fix flaky test around postcode word match penalties
This commit is contained in:
@@ -116,9 +116,11 @@ async def test_penalty_postcodes_and_housenumbers(conn, term, order):
|
||||
|
||||
assert query.num_token_slots() == 1
|
||||
|
||||
torder = [(tl.tokens[0].penalty, tl.ttype) for tl in query.nodes[0].starting]
|
||||
torder = [(min(t.penalty for t in tl.tokens), tl.ttype) for tl in query.nodes[0].starting]
|
||||
torder.sort()
|
||||
|
||||
print(torder)
|
||||
|
||||
assert [t[1] for t in torder] == order
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user