fix(deps): update dependency pytest-mock to v3#27
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
fix(deps): update dependency pytest-mock to v3#27renovate[bot] wants to merge 1 commit intomasterfrom
renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
fd5c3a9 to
3d562e4
Compare
3d562e4 to
909c6ed
Compare
909c6ed to
13628d3
Compare
Author
⚠ Artifact update problemRenovate 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:
The artifact failure details are included below: File name: poetry.lock |
Author
Edited/Blocked NotificationRenovate 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.13.0->^3.0.0Release Notes
pytest-dev/pytest-mock
v3.10.0Compare Source
mocker.stop(m)method to stop specificmocker.patchormocker.spycalls (#319_)... _#̴https://github.com/pytest-dev/pytest-mock/pull/319ull/319
v3.9.0Compare Source
NonCallableMagicMockvia themockerfixture (#318_)... _#̴https://github.com/pytest-dev/pytest-mock/pull/318ull/318
v3.8.2Compare Source
AsyncMocksupport for Python 3.7+ inmocker.async_stub(#302_)... _#̴https://github.com/pytest-dev/pytest-mock/pull/302ull/302
v3.8.1Compare Source
mockdependency in the code (#298_)... _#̴https://github.com/pytest-dev/pytest-mock/issues/298ues/298
v3.8.0Compare Source
MockerFixture.async_mockmethod. 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.0Compare Source
v3.6.1Compare Source
mocker.resetall()when usingmocker.spy()(#237). Thanks@blaxterfor 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.0Compare Source
pytest-mock no longer supports Python 3.5.
Correct type annotations for
mocker.patch.objectto also include the string form.Thanks
@plannigan_ for the PR (#235_).reset_allnow supportsreturn_valueandside_effectkeyword 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.1Compare Source
inspect.getattr_staticinstead of resorting toobject.__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.0Compare Source
Now all patch functions will emit a warning instead of raising a
ValueErrorwhen usedas a context-manager. Thanks
@iforapsy_ for the PR (#221_).Additionally,
mocker.patch.context_manageris available when the user intends to mocka context manager (for example
threading.Lockobject), which will not emit thatwarning.
.. _@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.0Compare Source
Add
mock.sealalias to themockerfixture (#211). Thanks@coiaxfor the PR.Fixed spying on exceptions not covered by the
Exceptionsuperclass (
#215), likeKeyboardInterrupt-- PR#216by
@webknjaz_.Before the fix, both
spy_returnandspy_exceptionwere always assigned to
Nonewhenever such an exception happened. And after this fix,
spy_exceptionis set to a correct value of an exceptionthat 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.1Compare Source
Introduce
MockFixtureas an alias toMockerFixture.Before
3.3.0, the fixture class was namedMockFixture, but was renamed toMockerFixtureto bettermatch the
mockerfixture. While not officially part of the API, it was later discovered that this brokethe code of some users which already imported
pytest_mock.MockFixturefor type annotations, so wedecided to reintroduce the name as an alias.
Note however that this is just a stop gap measure, and new code should use
MockerFixturefor type annotations.Improved typing for
MockerFixture.patch(#201). Thanks@srittaufor 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.0Compare Source
pytest-mocknow includes inline type annotations and exposes them to user programs. Themockerfixture returnspytest_mock.MockerFixture, which can be used to annotate your tests:.. code-block:: python
The type annotations were developed against mypy version
0.782, theminimum 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.0Compare Source
AsyncMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.AsyncMock>__ is now exposed inmockerand supports provides assertion introspection similar toMockobjects.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.1Compare Source
ValueErrorraisedwhen
mockeris used as context manager (#191_)... _#̴https://github.com/pytest-dev/pytest-mock/issues/191ues/191
v3.1.0Compare Source
New mocker fixtures added that allow using mocking functionality in other scopes:
class_mockermodule_mockerpackage_mockersession_mockerAdded 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.0Compare Source
Python 2.7 and 3.4 are no longer supported. Users using
pip 9or later will installa compatible version automatically.
mocker.spynow also works withasync deffunctions (#179). Thanks@frankie567for the PR!.. _#̴https://github.com/pytest-dev/pytest-mock/issues/179ues/179
.. _@frankie567: https://github.com/frankie567
v2.0.0Compare Source
Breaking Changes
++++++++++++++++
mocker.spyattributes for tracking returned values and raised exceptions of its spied functionsare now called
spy_returnandspy_exception, instead of reusing the existingMagicMockattributesreturn_valueandside_effect.Version
1.13introduced a serious regression: after a spied function usingmocker.spyraises an exception, further calls to the spy will not call the spied function,
always raising the first exception instead: assigning to
side_effectcausesunittest.mockto behave this way (#175_).The deprecated
mockalias to themockerfixture has finally been removed... _#̴https://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.
This PR has been generated by Mend Renovate. View repository job log here.