I agree that this is the correct thing to do.  However, it is error prone
and non-obvious.  Having a check that can ensure we do it correctly would
definitely help avoid this problem in the future.  Not needing to do it at
all would be even better, but I understand that changing 100,000 lines of
tests is not a viable solution.  But maybe it's something we can think
about for new tests.

And as to what Ian said, that was mostly my point - if there are functions
that don't need setup and teardown, just extract them from test fixtures.


On Wed, Jul 15, 2015 at 8:46 PM Tim Penhey <tim.pen...@canonical.com> wrote:

> I'm in agreement with Bogdan, Roger and William on this one.
>
> If your test suite is composed of other suites, and you override the
> default setup or teardown of either the suite or the test, you MUST call
> the respective methods of the embedded suites.
>
> Roger, if it is easy to write some code to assert this, I would LOVE to
> have that as a test. It is not something I have the ability to write
> quickly (if at all).
>
> As a rule, you should call the setups in the order you define them in
> the struct, and call teardown in the reverse order.
>
> Thanks,
> Tim
>
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to