fix flaky test around postcode word match penalties

This commit is contained in:
Sarah Hoffmann
2025-12-02 11:15:37 +01:00
parent 96d04e3a2e
commit 48d13c593b

View File

@@ -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