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.