File size: 804 Bytes
9febfad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
"""
Pytest configuration for NullAI tests
"""
import pytest
import os
import sys
import tempfile
# プロジェクトルートをパスに追加
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@pytest.fixture(scope="session")
def project_root():
"""プロジェクトルートパスを返す"""
return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@pytest.fixture
def temp_config_dir(tmp_path):
"""一時的な設定ディレクトリを作成"""
return str(tmp_path)
@pytest.fixture(scope="session")
def suppress_deprecation_warnings():
"""非推奨警告を抑制(テスト時のノイズ削減)"""
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
yield
warnings.resetwarnings()
|