File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ 1.2.dev
2+ -------
3+
4+ * Try to import ``mock `` first instead of ``unittest.mock ``. This gives the user flexibility
5+ to install a newer ``mock `` version from PyPI instead of using the one available in the
6+ Python distribution.
7+ Thanks `@wcooley `_ for the PR (`#54 `_).
8+
9+ .. _@wcooley : https://github.com/wcooley
10+ .. _#54 : https://github.com/pytest-dev/pytest-mock/issues/54
11+
1121.1
213---
314
Original file line number Diff line number Diff line change 11import inspect
2- import sys
32
43import pytest
54
6- if sys .version_info >= (3 , 3 ): # pragma: no cover
7- import unittest .mock as mock_module
8- else :
5+ try :
96 import mock as mock_module
7+ except ImportError :
8+ import unittest .mock as mock_module
109
1110version = '1.1'
1211
You can’t perform that action at this time.
0 commit comments