X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b90e719da595b6760b39b7cd64ee29447de2d5e8..3cc3e3b2e319c9db92da2efdefec2672780c5df9:/test/python/tools/test_exec_utils.py?ds=sidebyside diff --git a/test/python/tools/test_exec_utils.py b/test/python/tools/test_exec_utils.py index 25ccf163..b4439c12 100644 --- a/test/python/tools/test_exec_utils.py +++ b/test/python/tools/test_exec_utils.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. """ Tests for tools.exec_utils module. """ @@ -6,91 +12,9 @@ import subprocess import pytest +from nominatim.config import Configuration import nominatim.tools.exec_utils as exec_utils - -class TestRunLegacyScript: - - @pytest.fixture(autouse=True) - def setup_nominatim_env(self, tmp_path, def_config): - tmp_phplib_dir = tmp_path / 'phplib' - tmp_phplib_dir.mkdir() - (tmp_phplib_dir / 'admin').mkdir() - - class _NominatimEnv: - config = def_config - phplib_dir = tmp_phplib_dir - data_dir = Path('data') - project_dir = Path('.') - sqllib_dir = Path('lib-sql') - config_dir = Path('settings') - module_dir = 'module' - osm2pgsql_path = 'osm2pgsql' - - self.testenv = _NominatimEnv - - - def mk_script(self, code): - codefile = self.testenv.phplib_dir / 'admin' / 't.php' - codefile.write_text('