Hi!
On Fri, Sep 11, 2015 at 06:04:49PM -0700, Roberto Zanotto wrote:
> If you want to test some init procedure, I'd suggest you to rewrite the
> init like this:
> func init() {
> someFunc(real parameters)
> }
> And then you can run tests on someFunc(fake parameters).
We already doing this, but it's not enough. To make it really useful in
tests that someFunc() should completely reset package's state -
re-initialize all global vars, etc. This way tests will be able to call it
(and even call it multiple times when needed) to override everything what
was done by init() functions.
--
WBR, Alex.