return tmp_path
@pytest.fixture
-def conn(temp_db_conn, table_factory, monkeypatch):
- monkeypatch.setenv('NOMINATIM_DATABASE_MODULE_PATH', '.')
- table_factory('country_name', 'partition INT', (0, 1, 2))
+def conn(sql_preprocessor, temp_db_conn):
return temp_db_conn
$$ LANGUAGE plpgsql IMMUTABLE;
""")
- create_functions(conn, def_config, sql_tmp_path)
+ create_functions(conn, def_config)
assert temp_db_cursor.scalar('SELECT test()') == 43
$$ LANGUAGE plpgsql IMMUTABLE;
""")
- create_functions(conn, def_config, sql_tmp_path, enable_debug=dbg)
+ create_functions(conn, def_config, enable_debug=dbg)
assert temp_db_cursor.scalar('SELECT test()') == ret