Message185326
Yes this is still relevant and needs doing (and is easy).
The implementation should be similar to:
def patch(self, *args, **kwargs):
# lazy import
from unittest.mock import patch
p = patch(*args, **kwargs)
result = p.start()
self.addCleanup(p.stop)
return result
Plus tests and documentation. |
|
Date |
User |
Action |
Args |
2013-03-27 12:25:27 | michael.foord | set | recipients:
+ michael.foord, brett.cannon, ezio.melotti, eric.araujo, r.david.murray, pablomouzo, daniel.urban, chris.jerdonek, Julian |
2013-03-27 12:25:27 | michael.foord | set | messageid: <1364387127.14.0.621020485388.issue11664@psf.upfronthosting.co.za> |
2013-03-27 12:25:27 | michael.foord | link | issue11664 messages |
2013-03-27 12:25:26 | michael.foord | create | |
|