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 50b2fff8a..3ac90a2f3 100644 --- a/testkit/build.py +++ b/testkit/build.py @@ -28,6 +28,7 @@ if __name__ == "__main__": - run_python(["-m", "pip", "install", "-U", "pip"]) - run_python(["-m", "pip", "install", "--use-pep517", "-Ur", - "requirements-dev.txt"]) + run_python(["-m", "pip", "install", "-U", "pip"], + warning_as_error=False) + run_python(["-m", "pip", "install", "-Ur", "requirements-dev.txt"], + warning_as_error=False)