Most of the times when I run my tests, I do this via python -m unittest discover
(I'm lazy).
Lets say that one of the tests raises an exception. Is there a way to make unittest framework run a post-mortem on it (preferably ipdb.pm()
), without modifying the code of the tests?
I know I could add it directly to the code, but since I also use automatic runners / GitlabCI, I don't want those to hang up on the pdb shell.