Skip to content

Commit 1f300c9

Browse files
author
Sylvain MARIE
committed
Added documentation about support for pytest marks
1 parent 0c566b6 commit 1f300c9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ In these functions, you will typically either parse some test data files, or gen
5252
Case functions **do not have any particular requirement**, apart from their names starting with `case_`. They can return anything that is considered useful to run the associated test.
5353

5454

55+
!!! note "Support for pytest marks"
56+
Pytest marks such as `@pytest.mark.skip` can be used on case functions, the corresponding case will be handled according to the expected behaviour (failed if `@pytest.mark.fail`, skipped under condition if `@pytest.mark.skipif`, etc.)
57+
58+
5559
### c- Test functions
5660

5761
Then, as usual we write our `pytest` functions starting with `test_`, in a `test_foo.py` file:

docs/usage/basics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def case_simple_named() -> CaseData:
1919
return ins, outs, None
2020
```
2121

22+
## Pytest marks
23+
24+
Pytest marks such as `@pytest.mark.skipif` can be applied to case functions, the corresponding case will behave as expected.
25+
2226
## Case generators
2327

2428
A case function generator is a function that will generate several test cases, once for every combination of its declared input parameters.

0 commit comments

Comments
 (0)