Pytest-mock

Latest version: v3.14.0

Safety actively analyzes 628918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 11

0.11.0

------

* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
is now accessible from ``mocker``.
Thanks `satyrius`_ for the PR (`32`_).

* Fix regression using one of the ``assert_*`` methods in patched
functions which receive a parameter named ``method``.
Thanks `sagarchalise`_ for the report (`31`_).

.. _sagarchalise: https://github.com/sagarchalise
.. _satyrius: https://github.com/satyrius
.. _31: https://github.com/pytest-dev/pytest-mock/issues/31
.. _32: https://github.com/pytest-dev/pytest-mock/issues/32

0.10.1

------

* Fix regression in frozen tests due to ``distutils`` import dependency.
Thanks `The-Compiler`_ for the report (`29`_).

* Fix regression when using ``pytest-mock`` with ``pytest-2.7.X``.
Thanks `akscram`_ for the report (`28`_).

.. _akscram: https://github.com/Chronial
.. _28: https://github.com/pytest-dev/pytest-mock/issues/28
.. _29: https://github.com/pytest-dev/pytest-mock/issues/29

0.10

----

* ``pytest-mock`` now monkeypatches the ``mock`` library to improve pytest output
for failures of mock call assertions like ``Mock.assert_called_with()``.
Thanks to `Chronial`_ for idea and PR (`26`_, `27`_)!

.. _Chronial: https://github.com/Chronial
.. _26: https://github.com/pytest-dev/pytest-mock/issues/26
.. _27: https://github.com/pytest-dev/pytest-mock/issues/27

0.9.0

-----

* New ``mocker.resetall`` function, which calls ``reset_mock()`` in all mocked
objects up to that point. Thanks to `mathrick`_ for the PR!

0.8.1

-----

* ``pytest-mock`` is now also available as a wheel. Thanks `rouge8`_ for the PR!

0.8.0

-----

* ``mock.ANY`` is now accessible from the mocker fixture (`17`_), thanks `tigarmo`_ for the PR!

.. _17: https://github.com/pytest-dev/pytest-qt/issues/17

Page 9 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.