def METHOD_NAME(self, mock_subproc_popen):
    # mock the subprocess.Popen with a unexpected returncode
    process_mock = mock.Mock()
    attrs = {"returncode": -1}
    process_mock.configure_mock(**attrs)
    mock_subproc_popen.return_value = process_mock
    self.generate_snap_pair()
    base_delta = deltas.XDelta3Generator(
        source_path=self.source_file, target_path=self.target_file
    )
    self.assertThat(
        lambda: base_delta.make_delta(is_for_test=True),
        m.raises(deltas.errors.DeltaGenerationError),
    )