def test_skip(self)self assertequal(falsetrue@unittest skipif(sys version_info minor = "broken on "def test_skipif(self)self assertequal(falsetrue@unittest skipunless(sys platform startswith('linux')"broken unless on linux"def test_skipunless(self)self assertequal(falsetrueif __name__ ="__main__"unittest main(the first test failsbut it is reported as an expected failurethe second test is never run the other two tests may or may not be run depending on the current python version and operating system on my linux system running python the output looks like thisxssf ============================================================failtest_skipunless (__main__ skipteststraceback (most recent call last)file "skipping_tests py"line in test_skipunless self assertequal(falsetrueassertionerrorfalse !true ran tests in failed (failures= skipped= expected failures= the on the first line indicates an expected failurethe two characters represent skipped testsand the indicates real failuresince the conditional to skipunless was true on my system