X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3206bf59df0213d24bd3e11df7dd2abaebf89911..9025b0ec78bd770e74a1bed85c8d2e43ce5f571a:/test/python/test_tools_refresh_setup_website.py?ds=sidebyside diff --git a/test/python/test_tools_refresh_setup_website.py b/test/python/test_tools_refresh_setup_website.py index 9b60c0e5..8946bd1f 100644 --- a/test/python/test_tools_refresh_setup_website.py +++ b/test/python/test_tools_refresh_setup_website.py @@ -1,7 +1,6 @@ """ Tests for setting up the website scripts. """ -from pathlib import Path import subprocess import pytest @@ -9,67 +8,65 @@ import pytest from nominatim.tools import refresh @pytest.fixture -def envdir(tmpdir): - (tmpdir / 'php').mkdir() - (tmpdir / 'php' / 'website').mkdir() - return tmpdir +def test_script(tmp_path): + (tmp_path / 'php').mkdir() + website_dir = (tmp_path / 'php' / 'website') + website_dir.mkdir() -@pytest.fixture -def test_script(envdir): def _create_file(code): - outfile = envdir / 'php' / 'website' / 'reverse-only-search.php' + outfile = website_dir / 'reverse-only-search.php' outfile.write_text('