samedi 2 avril 2016

How to conditionally skip a test in nose2

The question "Skip a unit test from a Nose2 Plugin" describes a method for skipping all tests in nose2. I would like to skip some test functions when a condition is met, for example:

@skip_unless(condition)
def test_method(self):
    ...

In this example, I expect the test method to be reported as skipped. I was able to do this with some effort with nose, but I would like to see if it is possible in nose2.

Aucun commentaire:

Enregistrer un commentaire