def METHOD_NAME(self):
    delta_file = os.path.join(self.workdir, "target.snap.delta")
    target_file = os.path.join(self.workdir, "target.snap")
    source_file = os.path.join(self.workdir, "source.snap")
    with open(delta_file, "wb") as delta, open(source_file, "wb") as source:
        delta.seek(999 - 1)
        delta.write(b"\0")
        source.seek(1000 - 1)
        source.write(b"\0")
    generator = deltas.BaseDeltasGenerator(
        source_path=source_file,
        target_path=target_file,
        delta_format="xdelta3",
        delta_tool=self.delta_tool_path,
    )
    self.assertThat(
        lambda: generator._check_delta_size_constraint(delta_file),
        m.raises(deltas.errors.DeltaGenerationTooBigError),
    )