New checker "jc.IsNil"
John Meinel
john at arbash-meinel.com
Tue Nov 18 04:35:38 UTC 2014
This sounds great, and sounds like a sed replacement of:
s/Assert(err, gc.IsNil)/Assert(err, jc.IsNil)/
would be quite useful.
On Tue, Nov 18, 2014 at 8:22 AM, Tim Penhey <tim.penhey at canonical.com>
wrote:
> 'ello 'ackers,
>
> This is something that I have been meaning to add for quite some time.
>
> We have been recording stack traces with the juju/errors library, but
> until now, they have been of limited use.
>
> One of the key places I have wanted to see the stack trace for a while
> is when running tests, and I have a function that returns an error, I'd
> normally have:
>
> c.Assert(err, gc.IsNil)
>
> to make sure the error is nil. Now I have added a checker into the
> juju/testing/checkers that is error aware.
>
> If you now use jc.IsNil instead of gc.IsNil, and the value is an error,
> and the error has a stack trace, it will get printed out.
>
> Very handy.
>
> The dependencies of master have the versions you need to use it now.
>
> Cheers,
> Tim
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20141118/c8cf37b6/attachment.html>
More information about the Juju-dev
mailing list