def test_run_failing_script(self, mocker) -> None:
        """Test correct exception raise if run_script fails."""
        err = OSError()

        prompt = mocker.patch('subprocess.Popen')
        prompt.side_effect = err

        with pytest.raises(exceptions.FailedHookException) as excinfo:
            hooks.run_script(os.path.join(self.hooks_path, self.post_hook))
        assert f'Hook script failed (error: {err})' in str(excinfo.value)
Test correct exception raise if run_script fails.
tests/test_hooks.py