Enze Chi
Enze Chi

Reputation: 1763

It is possible to skip/fail test in setup using pytest?

I am using pytest and hope to check:

Is it possible to conditionally skip/fail tests (grouped in class) in setup?

Upvotes: 0

Views: 901

Answers (1)

The Compiler
The Compiler

Reputation: 11939

You can call pytest.skip(...) and pytest.fail(...) there. See "Imperative xfail from within a test or setup function" in the docs.

Upvotes: 2

Related Questions