diff --git a/.coveragerc b/.coveragerc index e1c6b1b..5684e5d 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,6 +3,5 @@ branch = True source = falcon omit = falcon/tests*,falcon/cmd*,falcon/bench* - [report] show_missing = True diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py index 95caac7..a142dd4 100644 --- a/tests/test_wsgi.py +++ b/tests/test_wsgi.py @@ -1,3 +1,4 @@ +import os import sys import time from wsgiref.simple_server import make_server @@ -15,7 +16,7 @@ from falcon.request_helpers import BoundedStream import falcon.testing as testing _SERVER_HOST = 'localhost' -_SERVER_PORT = 9809 +_SERVER_PORT = 9800 + os.getpid() % 100 # Facilitates parallel test execution _SERVER_BASE_URL = 'http://{0}:{1}/'.format(_SERVER_HOST, _SERVER_PORT) _SIZE_1_KB = 1024 diff --git a/tools/test-requires b/tools/test-requires index 7e56edd..62efe08 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -1,6 +1,8 @@ coverage>=4.1 ddt pytest>=3.0.1 +pytest-cov +pytest-xdist pyyaml requests six diff --git a/tox.ini b/tox.ini index 2cf19f1..493cfc8 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,7 @@ commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon whitelist_externals = mkdir mv commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon - coverage run -m pytest tests [] + pytest -n 4 --cov=falcon tests [] mkdir -p .coverage_data mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname} diff --git a/travis_scripts/install.sh b/travis_scripts/install.sh index 31fa6ab..1251e6b 100755 --- a/travis_scripts/install.sh +++ b/travis_scripts/install.sh @@ -7,6 +7,9 @@ if [ "$JYTHON" = "true" ]; then # bug: http://bugs.jython.org/issue527524). $HOME/jython/bin/pip install https://github.com/kennethreitz/requests/archive/v2.11.0.zip $HOME/jython/bin/pip install -r tools/test-requires + + # python-xdist is not compatible with Jython + $HOME/jython/bin/pip uninstall -y pytest-xdist else pip install tox coveralls fi