On 01/10/2012 03:59 AM, Ulrich Eckhardt wrote:
There is another dependency and that I'd call a logical dependency. This occurs when e.g. test X tests for an API presence and test Y tests the API behaviour. In other words, Y has no chance to succeed if X already failed. Unfortunately, there is no way to express this relation, there is no "@unittest.depends(test_X)" to decorate test_Y with (Not yet!).
The skipIf decorator exists precisely for this purpose. Generally, testing availability of resources (like existence of an API) should be done outside of the testing code. In other words, test_X should never be a test in the first place, it should be part of the setting up of the tests; the tests themselves should be completely independent of each other.
-- http://mail.python.org/mailman/listinfo/python-list