|
|
|
worker/deployer: Clarify imports
deployer_test imports a lot of 'testing' packages.
This just changes it so all of them are prefixed
to make it easier to figure out where each bit of code comes from.
https://code.launchpad.net/~jameinel/juju-core/trivial-deployer/+merge/173347
(do not edit description out of merge proposal)
Patch Set 1 #
Total messages: 5
|
jameinel
Please take a look.
|
12 years, 6 months ago (2013年07月07日 09:44:09 UTC) #1 | ||||||||||||||||||||||
Please take a look.
On 2013年07月07日 09:44:09, jameinel wrote: > Please take a look. not lgtm. I think there was agreement a while back that when we glommed onto the name space of an existing package we'd use import coretesting "testing" I don't see a need to overspecify the import path of our testing package.
On 2013年07月08日 02:12:44, dfc wrote: > On 2013年07月07日 09:44:09, jameinel wrote: > > Please take a look. > > not lgtm. I think there was agreement a while back that when we glommed onto the > name space of an existing package we'd use > > import coretesting "testing" > > I don't see a need to overspecify the import path of our testing package. stdtesting "testing" coretesting "launchpad.net/juju-core/testing" jujutesting "launchpad.net/juju-core/juju/testing" statetesting "launchpad.net/juju-core/state/testing" Those are the ones I've seen. "std" for packages in the standard library, and the other prefixes for ones in our files. If you look in that file, it already has 'coretesting' imported, which is *not* jujutesting. import ( "sort" "strings" stdtesting "testing" "time" . "launchpad.net/gocheck" "launchpad.net/juju-core/errors" "launchpad.net/juju-core/juju/testing" "launchpad.net/juju-core/state" "launchpad.net/juju-core/state/api/params" coretesting "launchpad.net/juju-core/testing" "launchpad.net/juju-core/worker/deployer" ) The fact that you missed the fact it was 'juju-core/juju/testing' rather than 'juju-core/testing' is exactly why I was trying to give it a more descriptive name.
LGTM
LGTM, but I'm a bit torn. It's not very good to see so many "testing" packages distributed all over. Maybe it's time to think about the advantages/disadvantages of having only one juju-core/testsupport (or similar) package.