diff options
author | Michael Foord <michael@voidspace.org.uk> | 2012-06-10 19:36:32 (GMT) |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2012-06-10 19:36:32 (GMT) |
commit | f7c41580578fdae4f8ab6c8eb6135902de5214d1 (patch) | |
tree | 8528e1d98410b12e7f8f0dd7aaad3f9c6f4404c4 /Doc | |
parent | bfcb42936bc53ff094d93db01a4fc9b78735f955 (diff) | |
download | cpython-f7c41580578fdae4f8ab6c8eb6135902de5214d1.zip cpython-f7c41580578fdae4f8ab6c8eb6135902de5214d1.tar.gz cpython-f7c41580578fdae4f8ab6c8eb6135902de5214d1.tar.bz2 |
Adding patch.stopall method to unittest.mock
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/unittest.mock.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 12b0275..1b39697 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1354,8 +1354,12 @@ method of a `TestCase`: As an added bonus you no longer need to keep a reference to the `patcher` object. -In fact `start` and `stop` are just aliases for the context manager -`__enter__` and `__exit__` methods. +It is also possible to stop all patches which have been started by using +`patch.stopall`. + +.. function:: patch.stopall + + Stop all active patches. TEST_PREFIX |