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 3.3.1 #67

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates pytest-mock from 3.1.0 to 3.3.1.

Changelog

3.3.1

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

* Introduce ``MockFixture`` as an alias to ``MockerFixture``.

Before ``3.3.0``, the fixture class was named ``MockFixture``, but was renamed to ``MockerFixture`` to better
match the ``mocker`` fixture. While not officially part of the API, it was later discovered that this broke
the code of some users which already imported ``pytest_mock.MockFixture`` for type annotations, so we
decided to reintroduce the name as an alias.

Note however that this is just a stop gap measure, and new code should use ``MockerFixture`` for type annotations.

3.3.0

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

* ``pytest-mock`` now includes inline type annotations and exposes them to user programs. The ``mocker`` fixture returns ``pytest_mock.MockerFixture``, which can be used to annotate your tests:

.. code-block:: python

     from pytest_mock import MockerFixture

     def test_foo(mocker: MockerFixture) -> None:
         ...

The type annotations were developed against mypy version ``0.782``, the
minimum version supported at the moment. If you run into an error that you believe to be incorrect, please open an issue.

Many thanks to `staticdev`_ for providing the initial patch (`199`_).

.. _staticdev: https://github.com/staticdev
.. _199: https://github.com/pytest-dev/pytest-mock/pull/199

3.2.0

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

* `AsyncMock <https://docs.python.org/3/library/unittest.mock.htmlunittest.mock.AsyncMock>`__ is now exposed in ``mocker`` and supports provides assertion introspection similar to ``Mock`` objects.

Added by `tirkarthi`_ in `197`_.

.. _tirkarthi: https://github.com/tirkarthi
.. _197: https://github.com/pytest-dev/pytest-mock/pull/197

3.1.1

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

* Fixed performance regression caused by the ``ValueError`` raised
when ``mocker`` is used as context manager (`191`_).

.. _191: https://github.com/pytest-dev/pytest-mock/issues/191
Links

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #75

@pyup-bot pyup-bot closed this Dec 15, 2020
@lucasrcezimbra lucasrcezimbra deleted the pyup-update-pytest-mock-3.1.0-to-3.3.1 branch December 15, 2020 14:21
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

1 participant