X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/faa85ded50bf8ab4e772d0352f316c25d2a0f510..72587b08fa66d70930b279a7ed96a945ed6c27e7:/test/bdd/steps/nominatim_environment.py diff --git a/test/bdd/steps/nominatim_environment.py b/test/bdd/steps/nominatim_environment.py index 4c973358..7741d667 100644 --- a/test/bdd/steps/nominatim_environment.py +++ b/test/bdd/steps/nominatim_environment.py @@ -1,13 +1,11 @@ -import logging import os from pathlib import Path -import subprocess import tempfile import psycopg2 import psycopg2.extras -LOG = logging.getLogger(__name__) +from steps.utils import run_script class NominatimEnvironment: """ Collects all functions for the execution of Nominatim functions. @@ -216,9 +214,4 @@ class NominatimEnvironment: else: cwd = self.build_dir - proc = subprocess.Popen(cmd, cwd=cwd, env=self.test_env, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - (outp, outerr) = proc.communicate() - outerr = outerr.decode('utf-8').replace('\\n', '\n') - LOG.debug("run_nominatim_script: %s\n%s\n%s", cmd, outp, outerr) - assert (proc.returncode == 0), "Script '%s' failed:\n%s\n%s\n" % (script, outp, outerr) + run_script(cmd, cwd=cwd, env=self.test_env)