From e54c54fe42121c2718e182cd361cc815d5c93523 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 21 Nov 2014 22:49:20 +0100 Subject: fix tests * add mock dependency in tox.ini for python older than 3.3 * set tox minimum version to 1.4: set basepython for python older than 3.3 --- doc/using.rst | 2 ++ tests/__init__.py | 2 +- tox.ini | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/using.rst b/doc/using.rst index e647614..c26f11b 100644 --- a/doc/using.rst +++ b/doc/using.rst @@ -263,6 +263,8 @@ To run tests against other Python versions: Run tests manually ------------------ +To run unit tests, the ``mock`` module is need on Python older than 3.3. + Run the following command:: python runtests.py -r diff --git a/tests/__init__.py b/tests/__init__.py index 42a7e20..2686fbc 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -9,7 +9,7 @@ try: except ImportError: import unittest try: - from unittest.mock import mock + from unittest import mock except ImportError: import mock diff --git a/tox.ini b/tox.ini index 66d8393..b7d2195 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +minversion = 1.4 envlist = py26,py27,py27_old,py27_patch,py32,py33,py33_old,py34,py35 [testenv:py26] @@ -6,6 +7,7 @@ setenv = TROLLIUSDEBUG = 1 deps= eventlet + mock trollius unittest2 commands=python runtests.py -r @@ -15,6 +17,7 @@ setenv = TROLLIUSDEBUG = 1 deps= eventlet + mock trollius commands=python runtests.py -r @@ -24,6 +27,7 @@ setenv = TROLLIUSDEBUG = 1 deps= eventlet==0.14.0 + mock trollius==0.3 commands=python runtests.py -r @@ -33,6 +37,7 @@ setenv = TROLLIUSDEBUG = 1 deps= eventlet + mock trollius commands=python runtests.py -r -m @@ -41,6 +46,7 @@ setenv = TROLLIUSDEBUG = 1 deps= eventlet + mock trollius commands=python runtests.py -r @@ -62,6 +68,7 @@ deps= commands=python runtests.py -r [testenv:py34] +basepython = python3.4 setenv = PYTHONASYNCIODEBUG = 1 deps= @@ -69,6 +76,7 @@ deps= commands=python runtests.py -r [testenv:py35] +basepython = python3.5 setenv = PYTHONASYNCIODEBUG = 1 deps= -- cgit v1.2.1