I just noticed that raising an exception in a callback to Config.add_cleanup doesn't allow subsequent cleanups to run. I'll fix this in another pr _Originally posted by @graingert in https://github.com/pytest-dev/pytest/issues/12958#issuecomment-2489467553_