python' discover module basically looks for any modules in the current folder or subfolders with names that start with the characters test if it finds any testcase objects in these modulesthe tests are executed it' painless way to ensure we don' miss running any tests to use itensure your test modules are named test_ py and then run the command python - unittest discover ignoring broken tests sometimesa test is known to failbut we don' want the test suite to report the failure this may be because broken or unfinished feature has had tests writtenbut we aren' currently focusing on improving it more oftenit happens because feature is only available on certain platformpython versionor for advanced versions of specific library python provides us with few decorators to mark tests as expected to fail or to be skipped under known conditions the decorators areexpectedfailure(skip(reasonskipif(conditionreasonskipunless(conditionreasonthese are applied using the python decorator syntax the first one accepts no argumentsand simply tells the test runner not to record the test as failure when it fails the skip method goes one step further and doesn' even bother to run the test it expects single string argument describing why the test was skipped the other two decorators accept two argumentsone boolean expression that indicates whether or not the test should be runand similar description in usethese three decorators might be applied like thisimport unittest import sys class skiptests(unittest testcase)@unittest expectedfailure def test_fails(self)self assertequal(falsetrue@unittest skip("test is useless"