Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pytest-mock to 2.0.0 #41

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Jan 5, 2020

This PR updates pytest-mock from 1.13.0 to 2.0.0.

Changelog

2.0.0

------------------

Breaking Changes
++++++++++++++++

* ``mocker.spy`` attributes for tracking returned values and raised exceptions of its spied functions
are now called ``spy_return`` and ``spy_exception``, instead of reusing the existing
``MagicMock`` attributes ``return_value`` and ``side_effect``.

Version ``1.13`` introduced a serious regression: after a spied function using ``mocker.spy``
raises an exception, further calls to the spy will not call the spied function,
always raising the first exception instead: assigning to ``side_effect`` causes
``unittest.mock`` to behave this way (`175`_).

* The deprecated ``mock`` alias to the ``mocker`` fixture has finally been removed.

.. _175: https://github.com/pytest-dev/pytest-mock/issues/175
Links

@lucasrcezimbra lucasrcezimbra merged commit acaf1b7 into master Jan 6, 2020
@lucasrcezimbra lucasrcezimbra deleted the pyup-update-pytest-mock-1.13.0-to-2.0.0 branch January 6, 2020 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants