8000 Merge pull request #318 from willfrey/patch-2 · pytest-dev/pytest-mock@1e2001f · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e2001f

Browse files
authored
Merge pull request #318 from willfrey/patch-2
2 parents 798f07e + 64a34f6 commit 1e2001f

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Releases
22
========
33

4+
3.9.0 (2022-09-28)
5+
------------------
6+
7+
* Expose ``NonCallableMagicMock`` via the ``mocker`` fixture (`#318`_).
8+
9+
.. _#318: https://github.com/pytest-dev/pytest-mock/pull/318
10+
411
3.8.2 (2022-07-05)
512
------------------
613

src/pytest_mock/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def __init__(self, config: Any) -> None:
5454
self.Mock = mock_module.Mock
5555
self.MagicMock = mock_module.MagicMock
5656
self.NonCallableMock = mock_module.NonCallableMock
57+
self.NonCallableMagicMock = mock_module.NonCallableMagicMock
5758
self.PropertyMock = mock_module.PropertyMock
5859
if hasattr(mock_module, "AsyncMock"):
5960
self.AsyncMock = mock_module.AsyncMock

tests/test_pytest_mock.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def test_mock_patch_dict_resetall(mocker: MockerFixture) -> None:
160160
"MagicMock",
161161
"Mock",
162162
"mock_open",
163+
"NonCallableMagicMock",
163164
"NonCallableMock",
164165
"PropertyMock",
165166
"sentinel",

0 commit comments

Comments
 (0)
0