summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Ruana <rob@relentlessidiot.com>2014-03-06 03:49:11 -0500
committerRob Ruana <rob@relentlessidiot.com>2014-03-06 03:49:11 -0500
commit8c5d541a8e3daf9aba4b44ed2f7ea55afb5a8d9c (patch)
treeb987da5a46b285a2881287a6a7a5fab46b961b79 /tests
parenta5488a86c5572228556a5ffe1fa051b4bdf5391a (diff)
downloadsphinx-8c5d541a8e3daf9aba4b44ed2f7ea55afb5a8d9c.tar.gz
Closes #1410: imports Mock from unittest.mock when available (Python >=3.3)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_napoleon.py6
1 files changed, 5 insertions, 1 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)