Skip
@karva.tags.skip skips a test and counts it in the results.
| test.py | |
|---|---|
1 2 3 4 5 | |
Use @karva.tags.skip or @karva.tags.skip() without a reason.
A reason can also be positional: @karva.tags.skip("Not implemented yet").
Conditions
Pass boolean conditions to skip a test only when all are true:
| test.py | |
|---|---|
1 2 3 4 5 6 | |
@karva.tags.skip(True, False) does not skip the test.
Running skipped tests
Run only tests with active skip conditions, or include them with other tests:
| Bash | |
|---|---|
1 2 | |
Their skip decorators are ignored, so they can pass or fail normally. Tests with false skip conditions are not considered ignored.
Pytest
@pytest.mark.skip and @pytest.mark.skipif are also supported:
| test.py | |
|---|---|
1 2 3 4 5 6 | |