Q:

if condition in setUp() ignore test

in unittest python library, exists the functions setUp and tearDown for set variables and other things pre and post tests.
how I can run or ignore a test with a condition in setUp ?

A:

You can call if cond: self.skipTest('reason') in setUp().

