Need team agreement on testing imports
Tim Penhey
tim.penhey at canonical.com
Fri Jun 28 00:44:27 UTC 2013
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
More information about the Juju-dev
mailing list