Sourced from pytest-mock's changelog.
3.5.0 (2021-01-04)
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](https://github.com/pytest-dev/pytest-mock/issues/221)
_).Additionally,
mocker.patch.context_manager
is available when the user intends to mock a context manager (for examplethreading.Lock
object), which will not emit that warning... _@iforapsy: https://github.com/iforapsy .. _#221: pytest-dev/pytest-mock#221
3.4.0 (2020-12-15)
Add
mock.seal
alias to themocker
fixture ([#211](https://github.com/pytest-dev/pytest-mock/issues/211)
). Thanks@coiax
for the PR.Fixed spying on exceptions not covered by the
Exception
superclass ([#215](https://github.com/pytest-dev/pytest-mock/issues/215)
), likeKeyboardInterrupt
-- PR[#216](https://github.com/pytest-dev/pytest-mock/issues/216)
by@webknjaz
_.Before the fix, both
spy_return
andspy_exception
were always assigned toNone
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/webknjaz .. _#211: pytest-dev/pytest-mock#211 .. _#215: pytest-dev/pytest-mock#215 .. _#216: pytest-dev/pytest-mock#216
cdd5d70
Update context-manager docs and prepare for 3.5.0f623fa8
Warn instead of raising exception in context manager (#221)5f6cab7
Merge pull request #220 from webknjaz/docs/216-changelog9771def
Fix typos in a change note for the PR #216d4e3f3e
Merge pull request #208 from pytest-dev/graingert-patch-1252eba8
Merge pull request #219 from nicoddemus/release-3.4.0df9ec17
Prepare release 3.4.091b4afb
Add testing for Python 3.9 (#218)9640a36
Merge pull request #216 from webknjaz/bugfixes/215-spy-on-keyboard-interrupt0e6b221
Ensure all the exceptions cat be spied on