Skip to content

Commit 3524117

Browse files
christinewangcwtkucar
authored and
tkucar
committed
chore(testing): set base dir in op creation (#399)
1 parent 1332f95 commit 3524117

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/integration/codegen/runner/conftest.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_free_port():
2323

2424

2525
@pytest.fixture(autouse=True)
26-
def repo_config() -> RepoConfig:
26+
def repo_config() -> Generator[RepoConfig, None, None]:
2727
yield RepoConfig(
2828
id=321,
2929
name="Kevin-s-Adventure-Game",
@@ -34,17 +34,17 @@ def repo_config() -> RepoConfig:
3434
)
3535

3636

37-
@pytest.fixture(autouse=True)
38-
def op(repo_config: RepoConfig) -> Generator[RemoteRepoOperator, None, None]:
39-
yield RemoteRepoOperator(repo_config=repo_config, access_token=config.GITHUB_TOKEN)
37+
@pytest.fixture
38+
def op(repo_config: RepoConfig, tmpdir) -> Generator[RemoteRepoOperator, None, None]:
39+
yield RemoteRepoOperator(repo_config=repo_config, access_token=config.GITHUB_TOKEN, base_dir=tmpdir)
4040

4141

42-
@pytest.fixture(autouse=True)
43-
def git_repo_client(repo_config: RepoConfig) -> GitRepoClient:
42+
@pytest.fixture
43+
def git_repo_client(repo_config: RepoConfig) -> Generator[GitRepoClient, None, None]:
4444
yield GitRepoClient(repo_config=repo_config, access_token=config.GITHUB_TOKEN)
4545

4646

47-
@pytest.fixture(autouse=True)
47+
@pytest.fixture
4848
def sandbox_client(repo_config: RepoConfig, get_free_port, tmpdir) -> Generator[SandboxClient, None, None]:
4949
# Use the pre-determined free port and a temporary directory
5050
repo_config.base_dir = str(tmpdir)

0 commit comments

Comments
 (0)