Skip to content

Commit e696bf0

Browse files
authored
Fix standalone mock support (#531)
It was removed by accident in #528 after running `pyupgrade --py39-plus`. Fix #530
1 parent 5b29b03 commit e696bf0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/pytest_mock/_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def get_mock_module(config):
1515
config.getini("mock_use_standalone_module")
1616
)
1717
if use_standalone_module:
18-
from unittest import mock
18+
import mock
1919

2020
_mock_module = mock
2121
else:

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ envlist = py{39,310,311,312,313,314}, norewrite, pytest6
55
[testenv]
66
deps =
77
coverage
8+
# Used for standalone mock support.
9+
mock
810
pytest-asyncio
911
pytest6: pytest==6.2.5
1012
commands =

0 commit comments

Comments
 (0)