diff options
| author | Rob Ruana <rob@relentlessidiot.com> | 2014-03-06 03:49:11 -0500 |
|---|---|---|
| committer | Rob Ruana <rob@relentlessidiot.com> | 2014-03-06 03:49:11 -0500 |
| commit | 8c5d541a8e3daf9aba4b44ed2f7ea55afb5a8d9c (patch) | |
| tree | b987da5a46b285a2881287a6a7a5fab46b961b79 | |
| parent | a5488a86c5572228556a5ffe1fa051b4bdf5391a (diff) | |
| download | sphinx-8c5d541a8e3daf9aba4b44ed2f7ea55afb5a8d9c.tar.gz | |
Closes #1410: imports Mock from unittest.mock when available (Python >=3.3)
| -rw-r--r-- | tests/test_napoleon.py | 6 | ||||
| -rw-r--r-- | tox.ini | 17 |
2 files changed, 21 insertions, 2 deletions
diff --git a/tests/test_napoleon.py b/tests/test_napoleon.py index d8c71960..9ec36efa 100644 --- a/tests/test_napoleon.py +++ b/tests/test_napoleon.py @@ -10,7 +10,11 @@ :license: BSD, see LICENSE for details. """ -from mock import Mock +try: + # Python >=3.3 + from unittest.mock import Mock +except ImportError: + from mock import Mock from sphinx.application import Sphinx from sphinx.ext.napoleon import (_process_docstring, _skip_member, Config, setup) @@ -3,7 +3,6 @@ envlist=py26,py27,py32,py33,pypy,du11,du10 [testenv] deps= - mock nose sqlalchemy whoosh @@ -13,8 +12,24 @@ commands= {envpython} tests/run.py {posargs} sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html +[testenv:py26] +deps= + mock + {[testenv]deps} + +[testenv:py27] +deps= + mock + {[testenv]deps} + +[testenv:py32] +deps= + mock + {[testenv]deps} + [testenv:pypy] deps= + mock simplejson {[testenv]deps} |
