Adding "AddCleanup" to gocheck
Gustavo Niemeyer
gustavo.niemeyer at canonical.com
Fri Aug 16 14:49:39 UTC 2013
Hey Tim,
On Fri, Aug 16, 2013 at 2:16 AM, Tim Penhey <tim.penhey at canonical.com> wrote:
> This method seems to create a callback for each test, but it also seems
> to me that the SetUpTest, TearDownTest, and the test method itself are
> run with different instances of C, is that right or am I misreading the
> code?
IIRC, the instance is the same for these. It's not the same for
SetUpSuite, though.
> This is then executed after the TearDownTest, but before the test is
> marked as completed. So the place I wanted to add it was to make a
> defer call just prior to:
That ordering seems non-intuitive. SetUpTest runs before the test, and
AddCleanup would run in the test. Why would the cleanup routine run
*after* the TearDownTest?
gustavo @ http://niemeyer.net
More information about the Juju-dev
mailing list