Bump mock from 4.0.3 to 5.1.0
Bumps mock from 4.0.3 to 5.1.0.
Changelog
Sourced from mock's changelog.
5.1.0
bpo-44185: :func:
unittest.mock.mock_openwill call the :func:closemethod of the file handle mock when it is exiting from the context manager. Patch by Samet Yaslan.gh-94924: :func:
unittest.mock.create_autospecnow properly returns coroutine functions compatible with :func:inspect.iscoroutinefunctionbpo-17013: Add
ThreadingMockto :mod:unittest.mockthat can be used to create Mock objects that can wait until they are called. Patch by Karthikeyan Singaravelan and Mario Corchero.bpo-41768: :mod:
unittest.mockspeccing no longer calls class properties. Patch by Melanie Witt.5.0.2
gh-102978: Fixes :func:
unittest.mock.patchnot enforcing function signatures for methods decorated with@classmethodor@staticmethodwhen patch is called withautospec=True.gh-103329: Regression tests for the behaviour of
unittest.mock.PropertyMockwere added.5.0.1
gh-100740: Fix
unittest.mock.Mocknot respecting the spec for attribute names prefixed withassert.gh-100690:
Mockobjects which are not unsafe will now raise anAttributeErrorwhen accessing an attribute that matches the name of an assertion but without the prefixassert_, e.g. accessingcalled_onceinstead ofassert_called_once. This is in addition to this already happening for accessing attributes with prefixesassert,assret,asert,aseert, andassrt.gh-96127:
inspect.signaturewas raisingTypeErroron call with mock objects. Now it correctly returns(*args, **kwargs)as infered signature.5.0.0
- gh-98624: Add a mutex to unittest.mock.NonCallableMock to protect concurrent access to mock attributes.
... (truncated)
Commits
d344fa2Preparing for 5.1.0 release.e53a01clatest sync point7334319Remove unused branches from mock module (#106617)f0cc385GH-61215: threadingmock: Remove unused branch fortimeout(#106591)acd5fc5Python 3.6+ compat8d36bf4gh-106300: ImproveassertRaises(Exception)usages in tests (GH-106302)9cbc589gh-106458: Marktestthreadingmock.pywith@requires_working_threading(GH...0dc15d4gh-61215: Renamewait_until_any_calltowait_until_any_call_with(#106414)cb8b3c8gh-61215: New mock to wait for multi-threaded events to happen (#16094)0bd94e6bpo-44185: Added close() to mock_open exit (#26902)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)