summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-11-21 22:49:20 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-11-21 22:49:20 +0100
commite54c54fe42121c2718e182cd361cc815d5c93523 (patch)
tree0f594253b3d011c20ef4bb43713831c4e1df1194
parentd2169c664ee53322023e4832bf0ac5908a7ee1e5 (diff)
downloadaioeventlet-e54c54fe42121c2718e182cd361cc815d5c93523.tar.gz
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
-rw-r--r--doc/using.rst2
-rw-r--r--tests/__init__.py2
-rw-r--r--tox.ini8
3 files changed, 11 insertions, 1 deletions
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=