diff --git a/requirements.txt b/requirements.txt index 48b29e61f..8fcebd963 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ Django>=1.4.11 # Test requirements pytest-django==2.6 +pytest-xdist==1.11 pytest==2.5.2 pytest-cov==1.6 flake8==2.2.2 diff --git a/runtests.py b/runtests.py index abf15a623..b13f2ecce 100755 --- a/runtests.py +++ b/runtests.py @@ -5,11 +5,12 @@ import pytest import sys import os import subprocess +import multiprocessing PYTEST_ARGS = { 'default': ['tests'], - 'fast': ['tests', '-q'], + 'fast': ['tests', '-q', '-n %d' % multiprocessing.cpu_count()], } FLAKE8_ARGS = ['rest_framework', 'tests', '--ignore=E501'] diff --git a/tox.ini b/tox.ini index 933ee560e..d80fa98c3 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,7 @@ deps = {py26,py27}-django{14,15}: django-oauth2-provider==0.2.3 {py26,py27}-django16: django-oauth2-provider==0.2.4 pytest-django==2.6.1 + pytest-xdist==1.11 django-filter==0.7 defusedxml==0.3 markdown>=2.1.0