diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a83c5d8..6bbd6c9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,14 @@ +0.10.dev +-------- + +* ``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-qt/issues/26 +.. _#27: https://github.com/pytest-dev/pytest-qt/issues/27 + 0.9.0 ----- diff --git a/README.rst b/README.rst index d627ca0..a0e1d28 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,23 @@ The stub is a mock object that accepts any arguments and is useful to test callb foo(stub) stub.assert_called_once_with('foo', 'bar') + +Improved reporting of mock call assertion errors +------------------------------------------------ + +*New in version 0.10* + +This plugin monkeypatches the mock library to improve pytest output for failures +of mock call assertions like ``Mock.assert_called_with()``. This is probably +safe, but if you encounter any problems this feature can be disabled in +your ``pytest.ini`` file: + +.. code-block:: ini + + [pytest] + mock_traceback_monkeypatch = false + + Note ---- @@ -143,13 +160,6 @@ module and the plugin were required within a test. The old fixture ``mock`` still works, but its use is discouraged and will be removed in version ``1.0``. -Improved reporting of mock call assertion errors ------------------------------------------------- - -This plugin monkeypatches the mock library to improve pytest output for failures -of mock call assertions like ``Mock.assert_called_with()``. This can be disabled -by setting ``mock_traceback_monkeypatch = false`` in the ini. - Requirements ============