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

fix(deps): update dependency pytest-mock to v3 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Dec 30, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pytest-mock ^1.13.0 -> ^3.0.0 age adoption passing confidence

Release Notes

pytest-dev/pytest-mock

v3.10.0

Compare Source

  • Added new mocker.stop(m) method to stop specific mocker.patch or mocker.spy calls (#319_).

.. _#&#820https://github.com/pytest-dev/pytest-mock/pull/319ull/319

v3.9.0

Compare Source

  • Expose NonCallableMagicMock via the mocker fixture (#318_).

.. _#&#820https://github.com/pytest-dev/pytest-mock/pull/318ull/318

v3.8.2

Compare Source

  • Fixed AsyncMock support for Python 3.7+ in mocker.async_stub (#302_).

.. _#&#820https://github.com/pytest-dev/pytest-mock/pull/302ull/302

v3.8.1

Compare Source

  • Fixed regression caused by an explicit mock dependency in the code (#298_).

.. _#&#820https://github.com/pytest-dev/pytest-mock/issues/298ues/298

v3.8.0

Compare Source

  • Add MockerFixture.async_mock method. Thanks @PerchunPak_ for the PR (#296_).

.. _@​PerchunPak: https://github.com/PerchunPak
.. [https://github.com/pytest-dev/pytest-mock/pull/296](https://togithub.com/pytest-dev/pytest-mock/pull/296)-mock/pull/296

v3.7.0

Compare Source

  • Python 3.10 now officially supported.
  • Dropped support for Python 3.6.

v3.6.1

Compare Source

  • Fix mocker.resetall() when using mocker.spy() (#237). Thanks @blaxter for the report and @shadycuz_ for the PR.

.. _@​blaxter: https://github.com/blaxter
.. _@​shadycuz: https://github.com/shadyc[https://github.com/pytest-dev/pytest-mock/issues/237](https://togithub.com/pytest-dev/pytest-mock/issues/237)ytest-mock/issues/237

v3.6.0

Compare Source

  • pytest-mock no longer supports Python 3.5.

  • Correct type annotations for mocker.patch.object to also include the string form.
    Thanks @plannigan_ for the PR (#235_).

  • reset_all now supports return_value and side_effect keyword arguments. Thanks @alex-marty_ for the PR (#214_).

.. _@​alex-marty: https://github.com/alex-marty
.. _@​plannigan: https://github.com/plannig[https://github.com/pytest-dev/pytest-mock/pull/214](https://togithub.com/pytest-dev/pytest-mock/pull/214)/pytest-mock[https://github.com/pytest-dev/pytest-mock/pull/235](https://togithub.com/pytest-dev/pytest-mock/pull/235)est-dev/pytest-mock/pull/235

v3.5.1

Compare Source

  • Use inspect.getattr_static instead of resorting to object.__getattribute__
    magic. This should better comply with objects which implement a custom descriptor
    protocol. Thanks @yesthesoup_ for the PR (#224_).

.. _@​yesthesoup: https://github.com/yesthesoup
.. [https://github.com/pytest-dev/pytest-mock/pull/224](https://togithub.com/pytest-dev/pytest-mock/pull/224)-mock/pull/224

v3.5.0

Compare Source

  • Now all patch functions will emit a warning instead of raising a ValueError when used
    as a context-manager. Thanks @iforapsy_ for the PR (#221_).

  • Additionally, mocker.patch.context_manager is available when the user intends to mock
    a context manager (for example threading.Lock object), which will not emit that
    warning.

.. _@​iforapsy: https://github.com/iforapsy
.. [https://github.com/pytest-dev/pytest-mock/pull/221](https://togithub.com/pytest-dev/pytest-mock/pull/221)-mock/pull/221

v3.4.0

Compare Source

  • Add mock.seal alias to the mocker fixture (#211). Thanks @coiax for the PR.

  • Fixed spying on exceptions not covered by the Exception
    superclass (#215), like KeyboardInterrupt -- PR #216
    by @webknjaz_.

    Before the fix, both spy_return and spy_exception
    were always assigned to None
    whenever such an exception happened. And after this fix,
    spy_exception is set to a correct value of an exception
    that has actually happened.

.. _@​coiax: https://github.com/coiax
.. _@​webknjaz: https://github.com/sponsors/webknj[https://github.com/pytest-dev/pytest-mock/pull/211](https://togithub.com/pytest-dev/pytest-mock/pull/211)/pytest-mock[https://github.com/pytest-dev/pytest-mock/issues/215](https://togithub.com/pytest-dev/pytest-mock/issues/215)t-dev/pytest[https://github.com/pytest-dev/pytest-mock/pull/216](https://togithub.com/pytest-dev/pytest-mock/pull/216)com/pytest-dev/pytest-mock/pull/216

v3.3.1

Compare Source

  • 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.

  • Improved typing for MockerFixture.patch (#201). Thanks @srittau for the PR.

.. _@​srittau: https://github.com/srittau
.. [https://github.com/pytest-dev/pytest-mock/pull/201](https://togithub.com/pytest-dev/pytest-mock/pull/201)-mock/pull/201

v3.3.0

Compare Source

  • 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
.. [https://github.com/pytest-dev/pytest-mock/pull/199](https://togithub.com/pytest-dev/pytest-mock/pull/199)-mock/pull/199

v3.2.0

Compare Source

  • AsyncMock <https://docs.python.org/3/library/unittest.mock.html#unittest.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
.. [https://github.com/pytest-dev/pytest-mock/pull/197](https://togithub.com/pytest-dev/pytest-mock/pull/197)-mock/pull/197

v3.1.1

Compare Source

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

.. _#&#820https://github.com/pytest-dev/pytest-mock/issues/191ues/191

v3.1.0

Compare Source

  • 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
.. [https://github.com/pytest-dev/pytest-mock/pull/182](https://togithub.com/pytest-dev/pytest-mock/pull/182)-mock/pull/182

v3.0.0

Compare Source

  • 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!

.. _#&#820https://github.com/pytest-dev/pytest-mock/issues/179ues/179
.. _@​frankie567: https://github.com/frankie567

v2.0.0

Compare Source

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.

.. _#&#820https://github.com/pytest-dev/pytest-mock/issues/175ues/175


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/pytest-mock-3.x branch 3 times, most recently from fd5c3a9 to 3d562e4 Compare December 30, 2020 11:17
@renovate renovate bot force-pushed the renovate/pytest-mock-3.x branch from 909c6ed to 13628d3 Compare March 7, 2022 11:13
@renovate
Copy link
Author

renovate bot commented Mar 7, 2022

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
installing v2 tool python v3.11.2
linking tool python v3.11.2
Python 3.11.2
pip 23.0.1 from /opt/buildpack/tools/python/3.11.2/lib/python3.11/site-packages/pip (python 3.11)
Installed v2 /usr/local/buildpack/tools/v2/python.sh in 7 seconds
Not a semver like version - aborting: ==1.0.5


@renovate
Copy link
Author

renovate bot commented Mar 23, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

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