Update src/_pytest/python.py

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Cheuk Ting Ho 2022-05-17 14:54:02 +01:00 committed by GitHub
parent a1f26dd035
commit ff3d9b26c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ def pytest_pyfunc_call(pyfuncitem: "Function") -> Optional[object]:
elif result is not None:
warnings.warn(
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`?"
)
)