Skip to content

Commit 225da22

Browse files
committed
Introduce MockFixture as alias to MockerFixture
Fix #204
1 parent 03da957 commit 225da22

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
3.3.1 (2020-08-24)
2+
------------------
3+
4+
* Introduce ``MockFixture`` as an alias to ``MockerFixture``.
5+
6+
Before ``3.3.0``, the fixture class was named ``MockFixture``, but was renamed to ``MockerFixture`` to better
7+
match the ``mocker`` fixture. While not officially part of the API, it was later discovered that this broke
8+
the code of some users which already imported ``pytest_mock.MockFixture`` for type annotations, so we
9+
decided to reintroduce the name as an alias.
10+
11+
Note however that this is just a stop gap measure, and new code should use ``MockerFixture`` for type annotations.
12+
113
3.3.0 (2020-08-21)
214
------------------
315

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)