From 1b5a35ac98a02a487768d39499a426e961fe4ef4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 12 Dec 2014 18:03:43 +0100 Subject: tox now also run the aiotest test suite --- doc/changelog.rst | 2 ++ run_aiotest.py | 9 +++++-- tox.ini | 70 +++++++++++++++++++++++++++++++------------------------ 3 files changed, 48 insertions(+), 33 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index ad328c3..f322592 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -4,6 +4,8 @@ Changelog 2014-12-03: Version 0.4 ----------------------- +* Add run_aiotest.py +* tox now also run the aiotest test suite * Rename the project from ``aiogreen`` to ``aioeventlet`` * Rename the ``link_future()`` function to :func:`yield_future` diff --git a/run_aiotest.py b/run_aiotest.py index b312bb2..76cc47a 100644 --- a/run_aiotest.py +++ b/run_aiotest.py @@ -1,8 +1,13 @@ -#import eventlet; eventlet.monkey_patch() +import eventlet +import sys + +if '-m' in sys.argv: + print("Enable eventlet monkey patching") + eventlet.monkey_patch() + sys.argv.remove('-m') import aioeventlet import aiotest.run -import eventlet config = aiotest.TestConfig() config.asyncio = aioeventlet.asyncio diff --git a/tox.ini b/tox.ini index b7d2195..37896ba 100644 --- a/tox.ini +++ b/tox.ini @@ -2,83 +2,91 @@ minversion = 1.4 envlist = py26,py27,py27_old,py27_patch,py32,py33,py33_old,py34,py35 +[testenv] +commands= + python runtests.py -r + python run_aiotest.py -r + [testenv:py26] setenv = TROLLIUSDEBUG = 1 deps= - eventlet - mock - trollius - unittest2 -commands=python runtests.py -r + aiotest + eventlet + mock + trollius + unittest2 [testenv:py27] setenv = TROLLIUSDEBUG = 1 deps= - eventlet - mock - trollius -commands=python runtests.py -r + aiotest + eventlet + mock + trollius [testenv:py27_old] basepython = python2.7 setenv = TROLLIUSDEBUG = 1 deps= - eventlet==0.14.0 - mock - trollius==0.3 -commands=python runtests.py -r + aiotest + eventlet==0.14.0 + mock + trollius==0.3 [testenv:py27_patch] basepython = python2.7 setenv = TROLLIUSDEBUG = 1 deps= - eventlet - mock - trollius -commands=python runtests.py -r -m + aiotest + eventlet + mock + trollius +commands= + python runtests.py -r -m + python run_aiotest.py -r -m [testenv:py32] setenv = TROLLIUSDEBUG = 1 deps= - eventlet - mock - trollius -commands=python runtests.py -r + aiotest + eventlet + mock + trollius [testenv:py33] setenv = PYTHONASYNCIODEBUG = 1 deps= - asyncio - eventlet -commands=python runtests.py -r + aiotest + asyncio + eventlet [testenv:py33_old] basepython = python3.3 setenv = PYTHONASYNCIODEBUG = 1 deps= - asyncio==0.4.1 - eventlet==0.15.0 -commands=python runtests.py -r + aiotest + asyncio==0.4.1 + eventlet==0.15.0 [testenv:py34] basepython = python3.4 setenv = PYTHONASYNCIODEBUG = 1 deps= - eventlet -commands=python runtests.py -r + aiotest + eventlet [testenv:py35] basepython = python3.5 setenv = PYTHONASYNCIODEBUG = 1 deps= - eventlet -commands=python runtests.py -r + aiotest + eventlet -- cgit v1.2.1