From 950ca9e33da9b6c5594b6280bda3c7c33813e600 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 20 Nov 2011 15:21:49 -0600 Subject: [PATCH] stop using the nose test runner --- .gitignore | 1 - pyramid_mailer/tests.py | 2 -- setup.cfg | 7 +++++++ setup.py | 5 +---- tox.ini | 36 +++++++++++++++++++++++++++++++++--- 5 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index 22161d5..74db11d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ coverage.xml *.swo *.zip *.orig -*.cfg *.tox env26/ dist diff --git a/pyramid_mailer/tests.py b/pyramid_mailer/tests.py index 3900c24..edc08bc 100644 --- a/pyramid_mailer/tests.py +++ b/pyramid_mailer/tests.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- - - import unittest from pyramid import testing diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..a14f2a0 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,7 @@ +[nosetests] +match=^test +where=pyramid_mailer +nocapture=1 +cover-package=pyramid_mailer +cover-erase=1 + diff --git a/setup.py b/setup.py index ec37137..2fcc02c 100644 --- a/setup.py +++ b/setup.py @@ -43,16 +43,13 @@ packages=[ 'pyramid_mailer', ], - test_suite='nose.collector', zip_safe=False, platforms='any', install_requires=[ 'pyramid', 'repoze.sendmail', ], - tests_require=[ - 'nose', - ], + test_suite='pyramid_mailer', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', diff --git a/tox.ini b/tox.ini index 4ca6980..ad277d1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,35 @@ [tox] -envlist = py25,py26,py27 +envlist = + py25,py26,py27,pypy,cover + [testenv] -commands = nosetests -deps = nose +commands = + python setup.py test -q + +[testenv:jython] +commands = + jython setup.py test -q +deps = + https://github.com/Pylons/webob/zipball/1.1-branch + https://github.com/Pylons/pyramid/zipball/1.2-branch + +[testenv:py25] +commands = + python setup.py test -q +deps = + https://github.com/Pylons/webob/zipball/1.1-branch + https://github.com/Pylons/pyramid/zipball/1.2-branch + +[testenv:cover] +basepython = + python2.6 +commands = + python setup.py nosetests --with-xunit --with-xcoverage +deps = + coverage==3.4 + nosexcover + +# we separate coverage into its own testenv because a) "last run wins" wrt +# cobertura jenkins reporting and b) pypy and jython can't handle any +# combination of versions of coverage and nosexcover that i can find. +# coverage==3.4 is required by nosexcover.