X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0ad1b28497b49bf8baa5cfa2ea4438c4824617a1..8ea7e043634457b4b588ed53c310c94885fc105a:/test/python/test_tools_refresh_create_functions.py diff --git a/test/python/test_tools_refresh_create_functions.py b/test/python/test_tools_refresh_create_functions.py index 4807e64f..ac2f2211 100644 --- a/test/python/test_tools_refresh_create_functions.py +++ b/test/python/test_tools_refresh_create_functions.py @@ -7,13 +7,12 @@ import pytest from nominatim.db.connection import connect from nominatim.tools.refresh import _get_standard_function_sql, _get_partition_function_sql -SQL_DIR = (Path(__file__) / '..' / '..' / '..' / 'sql').resolve() +SQL_DIR = (Path(__file__) / '..' / '..' / '..' / 'lib-sql').resolve() @pytest.fixture def db(temp_db): - conn = connect('dbname=' + temp_db) - yield conn - conn.close() + with connect('dbname=' + temp_db) as conn: + yield conn @pytest.fixture def db_with_tables(db):