[TIP] RFC: Add TestResult.done()
olemis at gmail.com
Wed Apr 8 06:33:17 PDT 2009
On Wed, Apr 8, 2009 at 8:07 AM, Robert Collins
<robertc at robertcollins.net> wrote:
> JML's testtools has a TestResult subclass with a done() method. The
> reason for this method is to allow doing things after the last test has
> run. While a result can infer 'first test' it can't infer 'last test'
> without ugliness like __del__.
> Some uses for this are:
> - reporting summary data
> - closing external resources like log files, sockets to remote machines
> - <your idea here>
- commiting test results to a RDBMS if considering storing test
results in a single transaction (all or nothing ;)
> This can be added quite safely I think - check for the attribute, and if
> present call it.
I give a big +0.75 for this ... :)
However I find out that TestResult has the following methods
['startTest', 'stop', 'stopTest', 'wasSuccessful', ...]
Isn't it enough ?
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Se retira el BDFL ... ¿El fin de Python 3k?
More information about the testing-in-python