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

parent 72d5cc0b
...@@ -170,8 +170,7 @@ setup_params = dict( ...@@ -170,8 +170,7 @@ setup_params = dict(
tests_require=[ tests_require=[
'setuptools[ssl]', 'setuptools[ssl]',
'pytest', 'pytest',
'mock', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []),
],
setup_requires=[ setup_requires=[
] + pytest_runner, ] + pytest_runner,
) )
......
import mock try:
from unittest import mock
except ImportError:
import mock
import pytest import pytest
from . import contexts from . import contexts
......
...@@ -15,7 +15,10 @@ import logging ...@@ -15,7 +15,10 @@ import logging
import itertools import itertools
import pytest import pytest
import mock try:
from unittest import mock
except ImportError:
import mock
from setuptools import sandbox from setuptools import sandbox
from setuptools import compat from setuptools import compat
......
...@@ -7,7 +7,10 @@ import contextlib ...@@ -7,7 +7,10 @@ import contextlib
import distutils.errors import distutils.errors
import pytest import pytest
import mock try:
from unittest import mock
except ImportError:
import mock
from . import contexts 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