Improve how tests are run

This commit is contained in:
David Cramer 2012-12-14 22:26:20 -08:00
parent 886460d75d
commit 40e000177d
5 changed files with 27 additions and 27 deletions

View File

@ -1,9 +1,13 @@
bootstrap: bootstrap-tests
pip install -e . --use-mirrors
bootstrap-tests:
pip install flake8>=1.6 --use-mirrors
pip install -r test-requirements.txt --use-mirrors
pip install "flake8>=1.6" --use-mirrors
test: lint
@echo "Running Python tests"
python setup.py -q test || exit 1
python runtests.py -x
@echo ""
lint:

View File

@ -5,8 +5,11 @@ import sys
def runtests(args=None):
import pytest
if args is None:
args = ['tests']
if not args:
args = []
if not any(a for a in args[1:] if not a.startswith('-')):
args.append('tests')
sys.exit(pytest.main(args))

View File

@ -1,5 +1,2 @@
[nosetests]
exclude=^(start|stop)_test_server
[pytest]
python_files=test*.py

View File

@ -22,26 +22,7 @@ for m in ('multiprocessing', 'billiard'):
from setuptools import setup, find_packages
tests_require = [
'blinker>=1.1',
'celery>=2.5',
'Django>=1.2,<1.5',
'django-celery>=2.5',
'Flask>=0.8',
'logbook',
'mock',
'pep8',
'pytz',
'pytest',
'pytest-django',
'tornado',
'unittest2',
'webob',
# pypy does not support gevent
# 'gevent',
# zerorpc is messing up travis
# 'zerorpc>=0.2.0',
]
tests_require = open('test-requirements.txt').splitlines()
setup(
name='raven',

15
test-requirements.txt Normal file
View File

@ -0,0 +1,15 @@
blinker>=1.1
celery>=2.5
Django>=1.2,<1.5
django-celery>=2.5
Flask>=0.8
logbook
mock
nose
pep8
pytz
pytest
pytest-django
tornado
unittest2
webob