Message165655
Attached is a patch illustrating the API I suggested for discussion.
To add custom setup and teardown context managers, the user can override the following method:
def executeTest(self):
with self.setUpContext():
self.runTestMethod()
The custom context managers can be placed either before or after the existing setUp/tearDown, or both.
The patch preserves the existing behavior that tearDown() should run only if setUp() was successful, and that doCleanups() should always run. All tests continue to pass with the patch. |
|
Date |
User |
Action |
Args |
2012-07-16 20:53:26 | chris.jerdonek | set | recipients:
+ chris.jerdonek, r.david.murray, michael.foord |
2012-07-16 20:53:26 | chris.jerdonek | set | messageid: <1342472006.05.0.466323169441.issue15351@psf.upfronthosting.co.za> |
2012-07-16 20:53:25 | chris.jerdonek | link | issue15351 messages |
2012-07-16 20:53:25 | chris.jerdonek | create | |
|