<div>Dear Experts,</div>
<div> </div>
<div>How does one use pdb and doctest.testmod(raise_on_error=True)? What I would like to happen is that when a doctest fails (e.g., by raising an exception), I can do import pdb; pdb.pm() to figure out what went wrong. But when I do 
pdb.pm() I end up in doctest.DebugRunner.report_unexpected_exception and can't see the actual code in my module which failed.</div>
<div> </div>
<div>Thanks,</div>
<div>-Emin</div>