Message229213
[padding to avoid UTF-8 error with bug tracker]
See also Issue 22374, where an equivalent of “patch.object” is suggested as an example context manager for the “contextlib” documentation.
If we added a plain function or context manager rather than a new TestCase method, it might avoid the worries about bloating the API. Then it could be a generic thing for any kind of testing, and not coupled with the “unittest” framework.
About cleanup functions more generally, I think they already tie in well with the TestCase.addCleanup() API. Perhaps it could handle general context managers as well though, by inheriting an ExitStack.enter_context() method or providing an ExitStack attribute. |
|
Date |
User |
Action |
Args |
2014-10-13 02:31:42 | martin.panter | set | recipients:
+ martin.panter, brett.cannon, pitrou, rbcollins, ezio.melotti, eric.araujo, r.david.murray, michael.foord, pablomouzo, daniel.urban, chris.jerdonek, Julian, parkouss |
2014-10-13 02:31:42 | martin.panter | set | messageid: <1413167502.34.0.585970647381.issue11664@psf.upfronthosting.co.za> |
2014-10-13 02:31:42 | martin.panter | link | issue11664 messages |
2014-10-13 02:31:42 | martin.panter | create | |
|