Changelog
### 3.5.0
```
------------------
* Now all patch functions will emit a warning instead of raising a ``ValueError`` when used
as a context-manager. Thanks `iforapsy`_ for the PR (`221`_).
* Additionally, ``mocker.patch.context_manager`` is available when the user intends to mock
a context manager (for example ``threading.Lock`` object), which will not emit that
warning.
.. _iforapsy: https://github.com/iforapsy
.. _221: https://github.com/pytest-dev/pytest-mock/pull/221
```
### 3.4.0
```
------------------
* Add `mock.seal` alias to the `mocker` fixture (`211`_). Thanks `coiax`_ for the PR.
* Fixed spying on exceptions not covered by the ``Exception``
superclass (`215`_), like ``KeyboardInterrupt`` -- PR `216`_
by `webknjaz`_.
Before the fix, both ``spy_return`` and ``spy_exception``
were always assigned to ``None``
whenever such an exception happened. And after this fix,
``spy_exception`` is set to a correct value of an exception
that has actually happened.
.. _coiax: https://github.com/coiax
.. _webknjaz: https://github.com/sponsors/webknjaz
.. _211: https://github.com/pytest-dev/pytest-mock/pull/211
.. _215: https://github.com/pytest-dev/pytest-mock/issues/215
.. _216: https://github.com/pytest-dev/pytest-mock/pull/216
```
Links
- PyPI: https://pypi.org/project/pytest-mock
- Changelog: https://pyup.io/changelogs/pytest-mock/
- Repo: https://github.com/pytest-dev/pytest-mock/
This PR updates pytest-mock from 3.3.1 to 3.5.0.
Changelog
### 3.5.0 ``` ------------------ * Now all patch functions will emit a warning instead of raising a ``ValueError`` when used as a context-manager. Thanks `iforapsy`_ for the PR (`221`_). * Additionally, ``mocker.patch.context_manager`` is available when the user intends to mock a context manager (for example ``threading.Lock`` object), which will not emit that warning. .. _iforapsy: https://github.com/iforapsy .. _221: https://github.com/pytest-dev/pytest-mock/pull/221 ``` ### 3.4.0 ``` ------------------ * Add `mock.seal` alias to the `mocker` fixture (`211`_). Thanks `coiax`_ for the PR. * Fixed spying on exceptions not covered by the ``Exception`` superclass (`215`_), like ``KeyboardInterrupt`` -- PR `216`_ by `webknjaz`_. Before the fix, both ``spy_return`` and ``spy_exception`` were always assigned to ``None`` whenever such an exception happened. And after this fix, ``spy_exception`` is set to a correct value of an exception that has actually happened. .. _coiax: https://github.com/coiax .. _webknjaz: https://github.com/sponsors/webknjaz .. _211: https://github.com/pytest-dev/pytest-mock/pull/211 .. _215: https://github.com/pytest-dev/pytest-mock/issues/215 .. _216: https://github.com/pytest-dev/pytest-mock/pull/216 ```Links
- PyPI: https://pypi.org/project/pytest-mock - Changelog: https://pyup.io/changelogs/pytest-mock/ - Repo: https://github.com/pytest-dev/pytest-mock/