runner: add clarifying comments on why runtestprotocol re-inits the FixtureRequest
This commit is contained in:
parent
f42b68ccaa
commit
5822888d73
|
@ -120,6 +120,8 @@ def runtestprotocol(
|
|||
) -> List[TestReport]:
|
||||
hasrequest = hasattr(item, "_request")
|
||||
if hasrequest and not item._request: # type: ignore[attr-defined]
|
||||
# This only happens if the item is re-run, as is done by
|
||||
# pytest-rerunfailures.
|
||||
item._initrequest() # type: ignore[attr-defined]
|
||||
rep = call_and_report(item, "setup", log)
|
||||
reports = [rep]
|
||||
|
|
Loading…
Reference in New Issue