Skip to content

Commit f52d396

Browse files
authored
Merge branch 'master' into type-improvements
2 parents 16d44f6 + 7c307ea commit f52d396

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
3.3.1 (2020-08-24)
1+
3.3.1 (2020-08-26)
22
------------------
33

44
* Improved typing for ``MockerFixture.patch`` (`#201`_). Thanks `@srittau`_ for the PR.
55

66
.. _@srittau: https://github.com/srittau
77
.. _#201: https://github.com/pytest-dev/pytest-mock/pull/201
88

9+
* Introduce ``MockFixture`` as an alias to ``MockerFixture``.
10+
11+
Before ``3.3.0``, the fixture class was named ``MockFixture``, but was renamed to ``MockerFixture`` to better
12+
match the ``mocker`` fixture. While not officially part of the API, it was later discovered that this broke
13+
the code of some users which already imported ``pytest_mock.MockFixture`` for type annotations, so we
14+
decided to reintroduce the name as an alias.
15+
16+
Note however that this is just a stop gap measure, and new code should use ``MockerFixture`` for type annotations.
917

1018
3.3.0 (2020-08-21)
1119
------------------

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ the method, and uses pytest's own `advanced assertions`_ to return a better
184184
diff::
185185

186186

187-
mocker = <pytest_mock.MockFixture object at 0x0381E2D0>
187+
mocker = <pytest_mock.MockerFixture object at 0x0381E2D0>
188188

189189
def test(mocker):
190190
m = mocker.Mock()

src/pytest_mock/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from pytest_mock.plugin import *
22

3+
MockFixture = MockerFixture # backward-compatibility only (#204)
4+
35
__all__ = [
46
"MockerFixture",
7+
"MockFixture",
58
"pytest_addoption",
69
"pytest_configure",
710
"session_mocker",

0 commit comments

Comments
 (0)