Skip to content

Update pytest-mock to 3.1.0#133

Closed
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-pytest-mock-1.13.0-to-3.1.0
Closed

Update pytest-mock to 3.1.0#133
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-pytest-mock-1.13.0-to-3.1.0

Conversation

@pyup-bot
Copy link
Copy Markdown
Collaborator

This PR updates pytest-mock from 1.13.0 to 3.1.0.

Changelog

3.1.0

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

* New mocker fixtures added that allow using mocking functionality in other scopes:

* ``class_mocker``
* ``module_mocker``
* ``package_mocker``
* ``session_mocker``

Added by `scorphus`_ in `182`_.

.. _scorphus: https://github.com/scorphus
.. _182: https://github.com/pytest-dev/pytest-mock/pull/182

3.0.0

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

* Python 2.7 and 3.4 are no longer supported. Users using ``pip 9`` or later will install
a compatible version automatically.

* ``mocker.spy`` now also works with ``async def`` functions (`179`_). Thanks `frankie567`_ for the PR!

.. _179: https://github.com/pytest-dev/pytest-mock/issues/179
.. _frankie567: https://github.com/frankie567

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2020

Codecov Report

Merging #133 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #133   +/-   ##
=======================================
  Coverage   30.00%   30.00%           
=======================================
  Files           3        3           
  Lines          10       10           
=======================================
  Hits            3        3           
  Misses          7        7           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 153162f...7415e0e. Read the comment docs.

@pyup-bot
Copy link
Copy Markdown
Collaborator Author

pyup-bot commented Jun 4, 2020

Closing this in favor of #147

@pyup-bot pyup-bot closed this Jun 4, 2020
@engnogueira engnogueira deleted the pyup-update-pytest-mock-1.13.0-to-3.1.0 branch June 4, 2020 15:40
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.

1 participant