I'd like to be able to enter an interactive session, preferably with IPython, if a unit test fails.  Is there an easy way to do this?
edit: by "interactive session" I mean a full Python REPL rather than a pdb shell.
edit edit: As a further explanation: I'd like to be able to start an interactive session that has access to the context in which the test failure occurred.  So for example, the test's self variable would be available.
Are you really sure you want to do this?  Your unit tests should do one thing, should be well-named, and should clearly print what failed.  If you do all of that, the failure message will pinpoint what went wrong; no need to go look at it interactively.  In fact, one of the big advantages of TDD is that it helps you avoid having to go into the debugger at all to diagnose problems.
drop into an interactive session to examine a failed unit test