summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-06-10 19:36:32 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2012-06-10 19:36:32 (GMT)
commitf7c41580578fdae4f8ab6c8eb6135902de5214d1 (patch)
tree8528e1d98410b12e7f8f0dd7aaad3f9c6f4404c4 /Doc
parentbfcb42936bc53ff094d93db01a4fc9b78735f955 (diff)
downloadcpython-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.rst8
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