Hi Alexander,
On Mon, Nov 14, 2016 at 9:34 PM Alexander Belopolsky <
[email protected]> wrote:
> where runtestprotocol() is a function returning a list to reports, but
> this list is apparently discarded by the runner. Can someone explain how
> reports are passed from the runner hooks to the terminal hooks?
>
The hook implemented by the terminal plugin is pytest_runtest_logreport.
That is called by the runner itself:
def call_and_report(item, when, log=True, **kwds):
call = call_runtest_hook(item, when, **kwds)
hook = item.ihook
report = hook.pytest_runtest_makereport(item=item, call=call)
if log:
hook.pytest_runtest_logreport(report=report)
if check_interactive_exception(call, report):
hook.pytest_exception_interact(node=item, call=call, report=report)
return report
Which is called by runtestprotocol. Not sure who is keeping extra
references around, can you make a diff of the objects before and after the
call? Also, did you try calling gc.collect()? There might be some circular
reference somewhere.
Cheers,
Bruno.
_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev