Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

301 B
Raw Blame
from unittest import mock

import pytest


@pytest.fixture
def with_tmp_env_file(tmp_path):
    env_file = tmp_path / ".swe-agent-env"
    env_file.write_text("{}")
    with mock.patch.dict("os.environ", {"SWE_AGENT_ENV_FILE": str(env_file)}, clear=True):
        yield env_file
    env_file.unlink()