From 83b55479e8ea1b146c946a357c7c999c231e2dae Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 15 May 2020 10:58:16 +0200 Subject: [PATCH] Fix pytest args splitting (#156) --- app_helper/pytest_runner.py | 3 ++- changes/155.bugfix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changes/155.bugfix diff --git a/app_helper/pytest_runner.py b/app_helper/pytest_runner.py index 039d601..01da2a3 100644 --- a/app_helper/pytest_runner.py +++ b/app_helper/pytest_runner.py @@ -2,6 +2,7 @@ from __future__ import absolute_import, print_function, unicode_literals import os +import shlex class PytestTestRunner(object): @@ -19,7 +20,7 @@ def run_tests(self, test_labels): """ import pytest - argv = os.environ.get("PYTEST_ARGS", "").split(" ") + argv = shlex.split(os.environ.get("PYTEST_ARGS", "")) if self.verbosity == 0: argv.append("--quiet") if self.verbosity == 2: diff --git a/changes/155.bugfix b/changes/155.bugfix new file mode 100644 index 0000000..4b09ccb --- /dev/null +++ b/changes/155.bugfix @@ -0,0 +1 @@ +Fix pytest args splitting