PhoneWork/conftest.py
Yuyao Huang eac90941ef feat: add SDK session implementation with approval flow and audit logging
- Implement SDK session with secretary model for tool approval flow
- Add audit logging for tool usage and permission decisions
- Support Feishu card interactions for approval requests
- Add new commands for task interruption and progress checking
- Remove old test files and update documentation
2026-04-01 12:51:00 +08:00

19 lines
700 B
Python

"""
Root conftest — runs before pytest collects any test files or imports any
production modules. Creates a temporary keyring.yaml from the test keyring
so that `import config` works without the real keyring.yaml.
Must live at the repo root (not inside tests/) to fire before collection.
"""
import shutil
from pathlib import Path
_REPO_ROOT = Path(__file__).parent
_TEST_KEYRING = _REPO_ROOT / "tests" / "keyring_test.yaml"
_KEYRING = _REPO_ROOT / "keyring.yaml"
# If the real keyring.yaml doesn't exist, copy the test version so config.py
# can load at module import time. This file is gitignored.
if not _KEYRING.exists() and _TEST_KEYRING.exists():
shutil.copy2(_TEST_KEYRING, _KEYRING)