Ok, just after I posted this I checked if side_effect would take an exception as value and handle raising it itself and it does, which sort of invalidates that specific use case, but at the same time we just deported that feature into python code of mock.