Use a version of pytest without this bug.
envlist = py35,py27,lint
[testenv]
+# Newer Pytest versions have a bug:
+# https://github.com/pytest-dev/pytest/issues/5971 which causes the whole test
+# process to crash if a multiprocessing job has an exception. Use 5.1.1 until
+# this is fixed.
deps =
-r{toxinidir}/requirements.txt
- pytest
+ pytest==5.1.1
pytest-xdist
filelock
commands =
- py.test -v --basetemp={envtmpdir} {posargs} --junit-xml={toxinidir}/{envname}_tests.xml --junit-prefix={envname} --color=yes -n 2
+ py.test -v --basetemp={envtmpdir} {posargs} --junit-xml={toxinidir}/{envname}_tests.xml --junit-prefix={envname} --color=yes -n 4
[testenv:lint]
basepython = python3.5
