This is required for pytest-pdb to be called with `--pdb`. TODO: - [ ] test - [ ] pass mode to hook, e.g. "post_mortem" in this case?