On Sat, Mar 1, 2008 at 9:02 AM, Thomas Herve <therve@wolfwood.twistedmatrix.com> wrote:
@@ -1241,6 +1242,13 @@ return result
+ def clear(self): + """ + Remove all previously added tests. + """ + self._tests = [] + +
class TestDecorator(components.proxyForInterface(itrial.ITestCase, "_originalTest")): @@ -1293,8 +1301,8 @@ # Originally, we recreated the suite by calling test.__class__. The problem # was that the old suite kept references to test instances, which turns out # to never be free. Now we remove the original references by emptying the - # _tests list. - test._tests = [] + # list of tests. + test.clear()
What's your plan for making sure this works with stdlib TestSuite? jml