mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1410: imports Mock from unittest.mock when available (Python >=3.3)
This commit is contained in:
parent
02363c3ce2
commit
5564012306
@ -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)
|
||||
|
17
tox.ini
17
tox.ini
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user