lundi 4 juin 2018

pytest skip other suite's tests due to specific critical test failure

I want to build an infrastructure which allows to wrap a code section in a test, or to wrap the whole test function, to mark that this code/test is critical for the other rest tests in the suit. And in case that this wrapped critical code fails, skip the rest of the tests in the same suite.

I can do it with context-manager and fixures, but I wonder if can do it in a more elegant way, maybe a PYTEST plugin or with use some other PYTEST tools.

Aucun commentaire:

Enregistrer un commentaire