diff --git a/testkit/_common.py b/testkit/_common.py index d4f8da965..1ab0254ed 100644 --- a/testkit/_common.py +++ b/testkit/_common.py @@ -13,5 +13,9 @@ def run(args, env=None): ) -def run_python(args, env=None): - run([TEST_BACKEND_VERSION, "-u", "-W", "error", *args], env=env) +def run_python(args, env=None, warning_as_error=True): + cmd = [TEST_BACKEND_VERSION, "-u"] + if warning_as_error: + cmd += ["-W", "error"] + cmd += list(args) + run(cmd, env=env) diff --git a/testkit/build.py b/testkit/build.py index dd1f318bc..2937f942e 100644 --- a/testkit/build.py +++ b/testkit/build.py @@ -9,6 +9,8 @@ if __name__ == "__main__": run_python(["setup.py", "build"]) - run_python(["-m", "pip", "install", "-U", "pip"]) - run_python(["-m", "pip", "install", "-Ur", - "testkitbackend/requirements.txt"]) + run_python(["-m", "pip", "install", "-U", "pip"], warning_as_error=False) + run_python( + ["-m", "pip", "install", "-Ur", "testkitbackend/requirements.txt"], + warning_as_error=False + )