From 9c8c3d414399e6e63de1a9329017c9d7e5503e4f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 3 May 2015 14:59:16 -0300 Subject: [PATCH] Update README and bump version to 0.5 --- README.rst | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 3fb8143..0bb4ca0 100644 --- a/README.rst +++ b/README.rst @@ -60,6 +60,14 @@ The supported methods are: * ``mocker.patch.dict``: see http://www.voidspace.org.uk/python/mock/patch.html#patch-dict. * ``mocker.stopall()``: stops all active patches at this point. +You can also access ``Mock`` and ``MagicMock`` directly using from ``mocker`` +fixture: + +.. code-block:: python + + def test_feature(mocker): + ret = [mocker.Mock(return_value=True), mocker.Mock(return_value=True)] + mocker.patch('mylib.func', side_effect=ret) Note ---- diff --git a/setup.py b/setup.py index f8cd67d..cfd8109 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='pytest-mock', - version='0.4.3', + version='0.5.0', entry_points={ 'pytest11': ['pytest_mock = pytest_mock'], },