Improve how tests are run
This commit is contained in:
parent
886460d75d
commit
40e000177d
8
Makefile
8
Makefile
|
@ -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:
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
[nosetests]
|
||||
exclude=^(start|stop)_test_server
|
||||
|
||||
[pytest]
|
||||
python_files=test*.py
|
||||
|
|
21
setup.py
21
setup.py
|
@ -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',
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue