Skip to content

Commit a12180e

Browse files
committed
Added note in documentation
1 parent 9040f17 commit a12180e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Case functions **do not have any particular requirement**, apart from their name
6161

6262
However, as shown in the example above, `pytest_cases` proposes to adopt a convention where the functions always returns a tuple of inputs/outputs/errors. A handy `CaseData` PEP484 type hint can be used to denote that.
6363

64+
!!! note "A case function can return **anything**"
65+
Even if in all examples in this documentation we chose to return a tuple (inputs/outputs/errors) (type hint `CaseData`), you can decide to return anything: a single variable, a dictionary, a tuple of a different length, etc. Whatever you return will be available through `case_data.get()` (see below).
66+
6467
### c- Test functions
6568

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

0 commit comments

Comments
 (0)