Use unittest.mock from standard library instead of external mock with Python >=3.3.

parent 72d5cc0b
......@@ -170,8 +170,7 @@ setup_params = dict(
tests_require=[
'setuptools[ssl]',
'pytest',
'mock',
],
] + (['mock'] if sys.version_info[:2] < (3, 3) else []),
setup_requires=[
] + pytest_runner,
)
......
import mock
try:
from unittest import mock
except ImportError:
import mock
import pytest
from . import contexts
......
......@@ -15,7 +15,10 @@ import logging
import itertools
import pytest
import mock
try:
from unittest import mock
except ImportError:
import mock
from setuptools import sandbox
from setuptools import compat
......
......@@ -7,7 +7,10 @@ import contextlib
import distutils.errors
import pytest
import mock
try:
from unittest import mock
except ImportError:
import mock
from . import contexts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment