Merge branch 'main' into llm_mock

This commit is contained in:
yzlin 2024-01-04 17:19:09 +08:00
commit 271ecc30a2
23 changed files with 575 additions and 114 deletions

View file

@ -11,6 +11,7 @@ import json
import logging
import os
import re
import uuid
import pytest
@ -123,9 +124,9 @@ def loguru_caplog(caplog):
# init & dispose git repo
@pytest.fixture(scope="session", autouse=True)
@pytest.fixture(scope="function", autouse=True)
def setup_and_teardown_git_repo(request):
CONFIG.git_repo = GitRepository(local_path=DEFAULT_WORKSPACE_ROOT / "unittest")
CONFIG.git_repo = GitRepository(local_path=DEFAULT_WORKSPACE_ROOT / f"unittest/{uuid.uuid4().hex}")
CONFIG.git_reinit = True
# Destroy git repo at the end of the test session.