mirror of
https://github.com/volcengine/OpenViking.git
synced 2026-10-01 17:57:49 +08:00
* refactor(client): remove Python embedded mode Consolidate Python consumers on the HTTP SDK while keeping shared server and storage capabilities unchanged. * refactor(client): remove obsolete embedded leftovers
32 lines
791 B
Python
32 lines
791 B
Python
# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.
|
|
# SPDX-License-Identifier: AGPL-3.0
|
|
|
|
"""Global test fixtures"""
|
|
|
|
import asyncio
|
|
import shutil
|
|
from pathlib import Path
|
|
from typing import Generator
|
|
|
|
import pytest
|
|
|
|
# Test data root directory
|
|
PROJECT_ROOT = Path(__file__).parent.parent
|
|
TEST_TMP_DIR = PROJECT_ROOT / "test_data" / "tmp"
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def event_loop():
|
|
"""Create session-level event loop"""
|
|
loop = asyncio.new_event_loop()
|
|
yield loop
|
|
loop.close()
|
|
|
|
|
|
@pytest.fixture(scope="function")
|
|
def temp_dir() -> Generator[Path, None, None]:
|
|
"""Create temp directory, auto-cleanup before and after test"""
|
|
shutil.rmtree(TEST_TMP_DIR, ignore_errors=True)
|
|
TEST_TMP_DIR.mkdir(parents=True, exist_ok=True)
|
|
yield TEST_TMP_DIR
|