fixbug: invalid default project name

This commit is contained in:
莘权 马 2024-01-04 20:16:29 +08:00
parent 5115e04f8c
commit f8dd30f133
13 changed files with 74 additions and 29 deletions

View file

@ -11,6 +11,7 @@ import json
import logging
import os
import re
import uuid
from typing import Optional
import pytest
@ -151,9 +152,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.