From 918af99a2ae21c133a0579a8c71e64efdcceba9c Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 20 Oct 2016 12:30:58 -0200 Subject: [PATCH] Remove example of obsolete pytest.main usage with string --- doc/en/goodpractices.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index 7c2fdccf2..2a5d4d7c8 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -236,9 +236,10 @@ your own setuptools Test command for invoking pytest. self.pytest_args = [] def run_tests(self): + import shlex #import here, cause outside the eggs aren't loaded import pytest - errno = pytest.main(self.pytest_args) + errno = pytest.main(shlex.split(self.pytest_args)) sys.exit(errno)