mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
adapt to changed loop handling of pytest_asyncio
This commit is contained in:
@@ -192,7 +192,7 @@ def apiobj(temp_db_with_extensions, temp_db_conn, monkeypatch):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(params=['postgres_db', 'sqlite_db'])
|
@pytest.fixture(params=['postgres_db', 'sqlite_db'])
|
||||||
def frontend(request, event_loop, tmp_path):
|
def frontend(request, tmp_path):
|
||||||
testapis = []
|
testapis = []
|
||||||
if request.param == 'sqlite_db':
|
if request.param == 'sqlite_db':
|
||||||
db = str(tmp_path / 'test_nominatim_python_unittest.sqlite')
|
db = str(tmp_path / 'test_nominatim_python_unittest.sqlite')
|
||||||
@@ -215,7 +215,7 @@ def frontend(request, event_loop, tmp_path):
|
|||||||
|
|
||||||
apiobj.async_to_sync(_do_sql())
|
apiobj.async_to_sync(_do_sql())
|
||||||
|
|
||||||
event_loop.run_until_complete(convert_sqlite.convert(None, db, options))
|
apiobj.async_to_sync(convert_sqlite.convert(None, db, options))
|
||||||
outapi = napi.NominatimAPI(environ={'NOMINATIM_DATABASE_DSN': f"sqlite:dbname={db}",
|
outapi = napi.NominatimAPI(environ={'NOMINATIM_DATABASE_DSN': f"sqlite:dbname={db}",
|
||||||
'NOMINATIM_USE_US_TIGER_DATA': 'yes'})
|
'NOMINATIM_USE_US_TIGER_DATA': 'yes'})
|
||||||
testapis.append(outapi)
|
testapis.append(outapi)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
markers =
|
markers =
|
||||||
sanitizer_params
|
sanitizer_params
|
||||||
|
asyncio_default_fixture_loop_scope = function
|
||||||
|
|||||||
Reference in New Issue
Block a user