[Twisted-Python] Re: [Twisted-commits] r22733 - Add clear() method to TestSuite, play with DocTestSuite (ahah some much fun).
jml at mumak.net
Fri Feb 29 17:17:39 EST 2008
On Sat, Mar 1, 2008 at 9:02 AM, Thomas Herve
<therve at 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,
> @@ -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?
More information about the Twisted-Python