Need team agreement on testing imports
John Meinel
john at arbash-meinel.com
Fri Jun 28 06:14:23 UTC 2013
If you troll through code reviews where this was brought up, William
proposed possibly using a common short name. So
import (
gc "launchpad.net/gocheck"
jc "launchpad.net/juju-core/testing/checkers"
)
That helps with the typing and stuttering, gives us namespaced imports, and
we can use it consistently across the codebase.
These imports will be use a lot, (50% of lines in test suites will have one
of them). To me it seems a reasonable compromise.
To be fair, I'm ok with import . in the test suite (never in actual code)
given how much it is referenced. However I do like namespacing as it gives
an easier way to figure out where this symbol comes from.
John
=:->
On Jun 28, 2013 6:08 AM, "David Cheney" <david.cheney at canonical.com> wrote:
>
> If we are forced to import checkers "normally", then we should do the same
>> for
>> gocheck also.
>>
>>
> I have no objection to that, based on the reasons outlined above.
>
> --
> 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/8b6574be/attachment.html>
More information about the Juju-dev
mailing list