mirror of
https://github.com/python/cpython.git
synced 2024-11-27 23:47:29 +01:00
1e40c5ba47
Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 lines
133 B
ReStructuredText
4 lines
133 B
ReStructuredText
Limit starting a patcher (from :func:`unittest.mock.patch` or
|
|
:func:`unittest.mock.patch.object`) more than
|
|
once without stopping it
|