diff --git a/.travis.yml b/.travis.yml index 732c5e0..c20154f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ language: python -python: - - "2.7" - - "3.3" +python: 2.7 +env: + - TOX_ENV=py27 + - TOX_ENV=py33 + - TOX_ENV=pypy install: - - "python setup.py install" -script: nosetests + - pip install tox +script: + - tox -e $TOX_ENV diff --git a/README.rst b/README.rst index 3dcbdd5..79b937f 100644 --- a/README.rst +++ b/README.rst @@ -3,6 +3,8 @@ Flask-Classy .. module:: flask.ext.classy +.. image:: https://travis-ci.org/apiguy/flask-classy.svg?branch=master :target: https://travis-ci.org/apiguy/flask-classy + Flask-Classy is an extension that adds class-based views to Flask. But why? diff --git a/setup.py b/setup.py index 347cb45..20dc640 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,8 @@ install_requires=[ 'Flask>=0.9' ], + tests_require=['nose'], + test_suite='nose.collector', classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', @@ -35,6 +37,5 @@ 'Programming Language :: Python :: 3.3', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' - ], - test_suite='test_classy' + ] ) \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..b198c5d --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist=py27,py33,pypy +[testenv] +commands=python setup.py test +[testenv:py27] +basepython=python2.7 +[testenv:py33] +basepython=python3.3 +[testenv:pypy] +basepython=pypy \ No newline at end of file