Adding patch.stopall method to unittest.mock

This commit is contained in:
Michael Foord 2012-06-10 20:36:32 +01:00
parent bfcb42936b
commit f7c4158057
3 changed files with 44 additions and 4 deletions

View file

@ -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