Skip to content

Commit

Permalink
Integrate pytest-xdist
Browse files Browse the repository at this point in the history
This speeds up test runs 4x on my machine (Lenovo P50)
  • Loading branch information
webknjaz committed Oct 20, 2018
1 parent c505770 commit e385ae2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ max-line-length=79

[tool:pytest]
testpaths = tests
addopts = --aiohttp-loop=all
addopts = -n auto --aiohttp-loop=all -p no:sugar
filterwarnings = error

[isort]
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ def read(f):
NEEDS_PYTEST = {'pytest', 'test'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if NEEDS_PYTEST else []

tests_require = ['pytest', 'gunicorn',
'pytest-timeout', 'async-generator']
tests_require = [
'pytest', 'gunicorn',
'pytest-timeout', 'async-generator',
'pytest-xdist',
]


args = dict(
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ envlist = check, {py35,py36}-{debug,release}-{cython,pure}, report
deps =
pytest
pytest-mock
pytest-xdist
# pytest-cov
coverage
gunicorn
Expand Down

0 comments on commit e385ae2

Please sign in to comment.