Update src/_pytest/python.py
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
parent
a1f26dd035
commit
ff3d9b26c7
|
@ -197,7 +197,7 @@ def pytest_pyfunc_call(pyfuncitem: "Function") -> Optional[object]:
|
||||||
elif result is not None:
|
elif result is not None:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
PytestReturnNotNoneWarning(
|
PytestReturnNotNoneWarning(
|
||||||
f"Expected None, but the test returned {result!r}, which will be an error in a "
|
f"Expected None, but {pyfuncitem.nodeid} returned {result!r}, which will be an error in a "
|
||||||
"future version of pytest. Did you mean to use `assert` instead of `return`?"
|
"future version of pytest. Did you mean to use `assert` instead of `return`?"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue