[Tutor] unittest decorators

Albert-Jan Roskam fomcl at yahoo.com
Wed Apr 2 09:37:21 CEST 2014

The unittest module has some really handy decorators: @unittest.skip
and @unittest.skipIf. I use the former for temporary TODO or FIXME things, but I use the latter for a more permanent thing: @unittest.skipif(sys.version_info()[0] > 2). Yet, in the test summary you just see error, skipped, failed. Is it possible to not count the skipIf tests? (other than using if-else inside the test --not really a bad solution either ;-)?




All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a 

fresh water system, and public health, what have the Romans ever done for us?


More information about the Tutor mailing list