black/tox.ini
Richard Si 4fc1354aeb
Speed up test suite via distributed testing (#2196)
* Speed up test suite via distributed testing

Since we now run the test suite twice, one with Python 2 and another
without, full test runs are getting pretty slow. Let's try to
fix that with parallization.

Also use verbose mode on CI since more logs is usually better since
getting more is quite literally impossible.

The main issue we'll face with this is we'll hit
https://github.com/pytest-dev/pytest-xdist/issues/620 sometimes
(although pretty rarely). I suppose we can test this and see if how bad
this bug is for us, and revert if necessary down the line.

Also let's have some colours 🎉
2021-05-07 16:41:55 +02:00

29 lines
747 B
INI

[tox]
envlist = py{36,37,38,39},fuzz
[testenv]
setenv = PYTHONPATH = {toxinidir}/src
skip_install = True
deps =
-r{toxinidir}/test_requirements.txt
commands =
pip install -e .[d]
coverage erase
pytest tests --run-optional no_python2 --numprocesses auto --cov {posargs}
pip install -e .[d,python2]
pytest tests --run-optional python2 --numprocesses auto --cov --cov-append {posargs}
coverage report
[testenv:fuzz]
skip_install = True
deps =
-r{toxinidir}/test_requirements.txt
hypothesmith
lark-parser < 0.10.0
; lark-parser's version is set due to a bug in hypothesis. Once it solved, that would be fixed.
commands =
pip install -e .[d]
coverage erase
coverage run fuzz.py
coverage report