Skip to content

Commit

Permalink
restore pytest.ini parallel mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Jun 12, 2018
1 parent 8550ced commit 5f68d9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pytest.ini
Expand Up @@ -19,3 +19,6 @@ python_files = test*.py
python_classes =
python_functions =

# always run in parallel (requires pytest-xdist, see test-requirements.txt)
addopts = -nauto

5 changes: 2 additions & 3 deletions runtests.py
Expand Up @@ -83,11 +83,10 @@ def add_pytest(self, files: List[Tuple[str, str]], coverage: bool = True) -> Non
if not pytest_files:
return
pytest_args = pytest_files + self.arglist + self.pyt_arglist
always_append = ['-n', 'auto', '--cov-append', '--cov-report=']
if coverage and self.coverage:
args = [sys.executable, '-m', 'pytest', '--cov=mypy'] + always_append + pytest_args
args = [sys.executable, '-m', 'pytest', '--cov=mypy'] + pytest_args
else:
args = [sys.executable, '-m', 'pytest', ] + always_append + pytest_args
args = [sys.executable, '-m', 'pytest'] + pytest_args

self.waiter.add(LazySubprocess('pytest', args, env=self.env,
passthrough=self.verbosity),
Expand Down

0 comments on commit 5f68d9e

Please sign in to comment.