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

Pin pytest-mock to latest version 1.5.0 #16

Closed
wants to merge 2 commits into from

Conversation

pyup-bot
Copy link
Collaborator

pytest-mock is not pinned to a specific version.

I'm pinning it to the latest version 1.5.0 for now.

These links might come in handy: PyPI | Changelog | Repo

Changelog

1.5.0


  • New mocker.mock_module variable points to the underlying mock module being used
    (unittest.mock or mock).
    Thanks blueyed_ for the request (71_).

.. _71: pytest-dev/pytest-mock#71

1.4.0


  • New configuration variable, mock_use_standalone_module (defaults to False). This forces
    the plugin to import mock instead of unittest.mock on Python 3. This is useful to import
    a newer version than the one available in the Python distribution.
  • Previously the plugin would first try to import mock and fallback to unittest.mock
    in case of an ImportError, but this behavior has been removed because it could hide
    hard to debug import errors (68_).
  • Now mock (Python 2) and unittest.mock (Python 3) are lazy-loaded to make it possible to
    implement the new mock_use_standlone_module configuration option. As a consequence of this
    the undocumented pytest_mock.mock_module variable, which pointed to the actual mock module
    being used by the plugin, has been removed.
  • DEFAULT <https://docs.python.org/3/library/unittest.mock.htmldefault>_ is now available from
    the mocker fixture.

.. _68: pytest-dev/pytest-mock#68

1.3.0


  • Add support for Python 3.6. Thanks hackebrot_ for the report (59_).
  • mock.mock_open is now aliased as mocker.mock_open for convenience.
    Thanks pokidovea_ for the PR (66_).

.. _hackebrot: https://github.com/hackebrot
.. _pokidovea: https://github.com/pokidovea
.. _59: pytest-dev/pytest-mock#59
.. _66: pytest-dev/pytest-mock#66

1.2


  • Try to import mock first instead of unittest.mock. This gives the user flexibility
    to install a newer mock version from PyPI instead of using the one available in the
    Python distribution.
    Thanks wcooley_ for the PR (54_).
  • mock.sentinel is now aliased as mocker.sentinel for convenience.
    Thanks kjwilcox_ for the PR (56_).

.. _wcooley: https://github.com/wcooley
.. _kjwilcox: https://github.com/kjwilcox
.. _54: pytest-dev/pytest-mock#54
.. _56: pytest-dev/pytest-mock#56

1.1


  • From this version onward, pytest-mock is licensed under the MIT_ license (45_).
  • Now the plugin also adds introspection information on differing call arguments when
    calling helper methods such as assert_called_once_with. The extra introspection
    information is similar to pytest's and can be disabled with the mock_traceback_monkeypatch
    option.
    Thanks asfaltboy_ for the PR (36_).
  • mocker.stub() now allows passing in the name for the constructed Mock <https://docs.python.org/3/library/unittest.mock.htmlthe-mock-class>_
    object instead of having to set it using the internal _mock_name attribute
    directly. This is useful for debugging as the name is used in the mock's
    repr string as well as related assertion failure messages.
    Thanks jurko-gospodnetic_ for the PR (40_).
  • Monkey patching mock module for friendlier tracebacks is automatically disabled
    with the --tb=native option. The underlying
    mechanism used to suppress traceback entries from mock module does not work with that option
    anyway plus it generates confusing messages on Python 3.5 due to exception chaining (44).
    Thanks blueyed
    for the report.
  • mock.call is now aliased as mocker.call for convenience.
    Thanks jhermann_ for the PR (49_).

.. _jurko-gospodnetic: https://github.com/jurko-gospodnetic
.. _asfaltboy: https://github.com/asfaltboy
.. _jhermann: https://github.com/jhermann
.. _45: pytest-dev/pytest-mock#45
.. _36: pytest-dev/pytest-mock#36
.. _40: pytest-dev/pytest-mock#40
.. _44: pytest-dev/pytest-mock#44
.. _49: pytest-dev/pytest-mock#49
.. _MIT: https://github.com/pytest-dev/pytest-mock/blob/master/LICENSE

1.0


  • Fix AttributeError with mocker.spy when spying on inherited methods
    (42). Thanks blueyed for the PR.

.. _blueyed: https://github.com/blueyed
.. _42: pytest-dev/pytest-mock#42

0.11.0


  • PropertyMock <https://docs.python.org/3/library/unittest.mock.htmlunittest.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: pytest-dev/pytest-mock#31
.. _32: pytest-dev/pytest-mock#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: pytest-dev/pytest-mock#28
.. _29: pytest-dev/pytest-mock#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: pytest-dev/pytest-mock#26
.. _27: pytest-dev/pytest-mock#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: pytest-dev/pytest-qt#17

0.7.0


Thanks to fogo_, mocker.spy can now prey upon staticmethods and classmethods. 😄

0.6.0


  • Two new auxiliary methods, spy and stub. See README for usage.
    (Thanks fogo_ for complete PR!)

0.5.0


  • Mock and MagicMock are now accessible from the mocker fixture,
    many thanks to marcwebbie_ for the complete PR!

0.4.3


  • mocker fixture now returns the same object (8). Many thanks to RonnyPfannschmidt for the PR!

.. _8: pytest-dev/pytest-qt#8

0.4.2


  • Small fix, no longer using wheel as an alternate package since it
    conditionally depends on mock module based on Python version,
    as Python >= 3.3 already includes unittest.mock.
    Many thanks to The-Compiler_ for letting me know and providing a PR with the fix!

0.4.1


  • Small release that just uses pytest_mock as the name of the plugin,
    instead of pytest-mock: this makes it simple to depend on this plugin
    explicitly using pytest_plugins module variable mechanism.

0.4.0


  • Changed fixture name from mock into mocker because it conflicted
    with the actual mock module, which made using it awkward when access to both
    the module and the fixture were required within a test.

Thanks kmosher_ for request and discussion in 4_. 😄

.. _4: pytest-dev/pytest-qt#4

0.3.0


  • Fixed bug 2_, where a patch would not be uninstalled correctly after
    patching the same object twice.

0.2.0


  • Added patch.dict support.

0.1.0


First release.

.. _2: pytest-dev/pytest-qt#2

.. _mathrick: https://github.com/mathrick
.. _tigarmo: https://github.com/tigarmo
.. _rouge8: https://github.com/rouge8
.. _fogo: https://github.com/fogo
.. _marcwebbie: https://github.com/marcwebbie
.. _RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
.. _The-Compiler: https://github.com/The-Compiler
.. _kmosher: https://github.com/kmosher

Got merge conflicts? Close this PR and delete the branch. I'll create a new PR for you.

Happy merging! 🤖

@codecov-io
Copy link

codecov-io commented Dec 13, 2016

Current coverage is 74.74% (diff: 100%)

No coverage report found for master at 4cc05be.

Powered by Codecov. Last update 4cc05be...7e839e5

@dguitarbite dguitarbite deleted the pyup-pin-pytest-mock-1.5.0 branch December 13, 2016 10:54
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.

3 participants