1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/commits/fdc28ac2029f/
Changeset: fdc28ac2029f
User: RonnyPfannschmidt
Date: 2013-04-18 11:18:24
Summary: pdb plugin: move entering pdb into a toplevel function
this prepares pdb at collect time
Affected #: 1 file
diff -r ed380ceafe15f379bc310d1cd43296e0983c6b75 -r
fdc28ac2029f1c0be1dac4991c2f1b014c39a03f _pytest/pdb.py
--- a/_pytest/pdb.py
+++ b/_pytest/pdb.py
@@ -61,20 +61,26 @@
return rep
if hasattr(rep, "wasxfail"):
return rep
- # we assume that the above execute() suspended capturing
- # XXX we re-use the TerminalReporter's terminalwriter
- # because this seems to avoid some encoding related troubles
- # for not completely clear reasons.
- tw = item.config.pluginmanager.getplugin("terminalreporter")._tw
- tw.line()
- tw.sep(">", "traceback")
- rep.toterminal(tw)
- tw.sep(">", "entering PDB")
+ return _enter_pdb(item, call.excinfo, rep)
- tb = _postmortem_traceback(call.excinfo)
- post_mortem(tb)
- rep._pdbshown = True
- return rep
+
+
+
+def _enter_pdb(item, excinfo, rep):
+ # we assume that the above execute() suspended capturing
+ # XXX we re-use the TerminalReporter's terminalwriter
+ # because this seems to avoid some encoding related troubles
+ # for not completely clear reasons.
+ tw = item.config.pluginmanager.getplugin("terminalreporter")._tw
+ tw.line()
+ tw.sep(">", "traceback")
+ rep.toterminal(tw)
+ tw.sep(">", "entering PDB")
+
+ tb = _postmortem_traceback(excinfo)
+ post_mortem(tb)
+ rep._pdbshown = True
+ return rep
def _postmortem_traceback(excinfo):
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
pytest-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pytest-commit