From 42a66da4a6dc9940fbd3b258870784b68bd6baa9 Mon Sep 17 00:00:00 2001 From: Jonathan Tushman Date: Tue, 1 Apr 2014 15:30:23 -0400 Subject: [PATCH 1/2] adding tox support, and support for python setup.py test, and tests for pypy --- .travis.yml | 13 ++++++++----- setup.py | 5 +++-- tox.ini | 10 ++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 tox.ini 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/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 From 35eae7f4001da84054b8512b37e7f0e7af87f23f Mon Sep 17 00:00:00 2001 From: Jonathan Tushman Date: Tue, 1 Apr 2014 15:33:07 -0400 Subject: [PATCH 2/2] adding travis badge to docs --- README.rst | 2 ++ 1 file changed, 2 insertions(+) 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?