print captured logs before entering pdb

This commit is contained in:
Brian Maissy
2018-02-12 22:05:46 +02:00
parent f263932883
commit 069f32a8c4
3 changed files with 22 additions and 0 deletions

View File

@@ -97,6 +97,11 @@ def _enter_pdb(node, excinfo, rep):
tw.sep(">", "captured stderr")
tw.line(captured_stderr)
captured_logs = rep.caplog
if len(captured_logs) > 0:
tw.sep(">", "captured logs")
tw.line(captured_logs)
tw.sep(">", "traceback")
rep.toterminal(tw)
tw.sep(">", "entering PDB")