Skip to content

Commit 995e60e

Browse files
Merge pull request #2017 from nicoddemus/pytest-main-args-docs
Remove example of obsolete pytest.main usage with string
2 parents c0719a5 + 918af99 commit 995e60e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

doc/en/goodpractices.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,10 @@ your own setuptools Test command for invoking pytest.
236236
self.pytest_args = []
237237
238238
def run_tests(self):
239+
import shlex
239240
#import here, cause outside the eggs aren't loaded
240241
import pytest
241-
errno = pytest.main(self.pytest_args)
242+
errno = pytest.main(shlex.split(self.pytest_args))
242243
sys.exit(errno)
243244
244245

0 commit comments

Comments
 (0)