Need team agreement on testing imports
David Cheney
david.cheney at canonical.com
Fri Jun 28 01:38:49 UTC 2013
I vote against using a local import. I believe this is contrary to the
Go orthodoxy and will hinder adoption by potential external contributors.
On Fri, Jun 28, 2013 at 10:44 AM, Tim Penhey <tim.penhey at canonical.com>wrote:
> Hi All,
>
> We currently have two commonly used idioms for importing checkers. In
> particular "launchpad.net/juju-core/testing/checkers".
>
> I have the preference of importing the checkers into the local namespace
> so they behave in the same way as the gocheck checkers. I find this
> makes the tests more readable. Given that the checkers package should
> only be bringing in checkers and not miscellaneous functions, then I'm
> happy to bring them into the local namespace.
>
> This means we have:
>
> c.Assert(foo, IsTrue)
> c.Assert(bar.SomeFunc(), IsDirectory)
>
>
> I know that Roger generally disapproves and has been including the
> checkers package normally. This would make the above:
>
> c.Assert(foo, checkers.IsTrue)
> c.Assert(bar.SomeFunc(), checkers.IsDirectory)
>
>
> What I don't want is arbitrary changing of the imports as different
> people touch various parts of the codebase into their preferred format.
>
> I'd like to get a team agreement on what approach people are happy with.
>
> I'm happy to go with a majority decision either way, but I'd like the
> team to decide. If we don't get a quorum of response (for whatever
> value that may be), I'm going to defer to William as tech lead.
>
> 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/20130628/8ae476c9/attachment.html>
More information about the Juju-dev
mailing list