Skip to content

Commit a1f26dd

Browse files
committed
deprecated reference
1 parent 0c832ca commit a1f26dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/en/deprecations.rst

+10
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,16 @@ or ``pytest.warns(Warning)``.
252252

253253
See :ref:`warns use cases` for examples.
254254

255+
256+
Returning non-None value in test functions
257+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
258+
259+
.. deprecated:: 7.0
260+
261+
:class:`pytest.PytestReturnNotNoneWarning` will be warn if a test function return values other than None.
262+
It is to avoid typo of an `assert` statement as `return` in a test function makes it passes the test without warning or failing, regardless of if the test should have pass or not.
263+
264+
255265
The ``--strict`` command-line option
256266
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
257267

0 commit comments

Comments
 (0)