Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r61731:79d089804160
Date: 2013-02-24 18:01 +0200
http://bitbucket.org/pypy/pypy/changeset/79d089804160/
Log: yes, pytest is awesome that way
diff --git a/_pytest/pdb.py b/_pytest/pdb.py
--- a/_pytest/pdb.py
+++ b/_pytest/pdb.py
@@ -72,9 +72,12 @@
tw.sep(">", "entering PDB")
# A doctest.UnexpectedException is not useful for post_mortem.
# Use the underlying exception instead:
- if isinstance(call.excinfo.value, py.std.doctest.UnexpectedException):
- tb = call.excinfo.value.exc_info[2]
- else:
+ try:
+ if isinstance(call.excinfo.value,
py.std.doctest.UnexpectedException):
+ tb = call.excinfo.value.exc_info[2]
+ else:
+ tb = call.excinfo._excinfo[2]
+ except (ImportError, AttributeError):
tb = call.excinfo._excinfo[2]
post_mortem(tb)
rep._pdbshown = True
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit