X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1f29475fa51455363f8cc7b55bec0e801afc638b..0a3c3827859e504fec64ca44a83ed2686ee318d5:/test/bdd/steps/table_compare.py?ds=sidebyside diff --git a/test/bdd/steps/table_compare.py b/test/bdd/steps/table_compare.py index 51d1b645..481a29a0 100644 --- a/test/bdd/steps/table_compare.py +++ b/test/bdd/steps/table_compare.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# This file is part of Nominatim. (https://nominatim.org) +# +# Copyright (C) 2022 by the Nominatim developer community. +# For a full list of authors see the git log. """ Functions to facilitate accessing and comparing the content of DB tables. """ @@ -196,7 +202,7 @@ class DBRow: if actual == 0: return "place ID 0" - with self.context.db.cursor(): + with self.context.db.cursor() as cur: cur.execute("""SELECT osm_type, osm_id, class FROM placex WHERE place_id = %s""", (actual, ))