[Avocado-devel] calling self.fail() in setUp() == ERROR result?

Brian J. Murrell brian at interlinx.bc.ca
Wed Sep 11 17:14:51 UTC 2019


On Wed, 2019-09-11 at 19:09 +0200, Lukáš Doktor wrote:
> 
> Hello Brian,

Hi Lukáš,

> this is expected behavior. It's because the test hasn't actually
> started, therefor it can not fail.

Ahh.  But it has, if setUp() is running code from the module that is
being tested.  In this case the code that is in the module that setUp()
is running is code that needs to run prior to every test.  But it's
still code under test from the module being tested.

> This is deliberate as setUp issues should not be related to the
> module under testing.

Unless setUp() is using some of the code being tested to prepare for
the tests.

Cheers,
b.

> > 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20190911/6795639f/attachment.sig>


More information about the Avocado-devel mailing list