POSA_Copyrighter/tests/conftest.py
changukyu 2661af86e5 feat: codex 검토 잔여 ③④⑤ + 밀린 부채 — 투입 충돌 표시, 사용/무관 분리, 측정 불가, VERSION
③ 파일명 stem 충돌: 다른 폴더의 같은 이름 파일이 한 건으로 합쳐져 둘째가 조용히 미심사였다.
   id 는 재유도하지 않고(기존 판정 보존) id_collisions() 로 탐지해 bootstrap.intakeConflicts 와
   파일당 1회 감사로 남기고, 콘솔 투입 상태줄에 경고 목록을 띄운다.
④ 행 버튼 '미사용' 이 false_positive 로 가 대표 근거 하나를 고르면 나머지 점수가 지워졌다 →
   '사용'/'무관', 사용 재클릭은 pending(표시 해제, 점수 유지).
⑤ 분모 0 비율은 None → '측정 불가'. 외부 검색이 꺼진 케이스는 점수 0 유지, 한 줄 요약에
   '외부 검색 꺼짐'.

부채: operator-review-workflow 13px 넘침 해소(겹치지 않는 레인 병합) → 다이어그램 5종 첫
REBUILD OK, v6 이전 카드 문구 교정. tests/conftest.py 로 로컬 Ollama 격리(가동 중에도 통과).
루트 VERSION 0.1.0 단일 출처, /health 와 기동 로그에 버전·스코어러 버전.

verify.ps1 (Ollama 가동 중, override 없음): ruff clean, 680 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BStHFrjQj2VypecSG9ex1V
2026-09-25 18:13:09 +09:00

20 lines
771 B
Python

"""Suite-wide isolation from services that happen to run on the test host.
A store built without an explicit provider_runtime reads os.environ, and the
LLM client defaults to Ollama on 127.0.0.1:11434. With a local Ollama running,
those tests made real calls and three test_http_app specs failed on socket
timeouts - an air-gapped project's suite depended on the *absence* of a local
service. Point the default at a port nothing listens on; tests that exercise the
LLM pass their own env and fake transport and are unaffected.
"""
from __future__ import annotations
import pytest
_DEAD_OLLAMA = "http://127.0.0.1:1"
@pytest.fixture(autouse=True)
def _no_local_ollama(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OLLAMA_BASE_URL", _DEAD_OLLAMA)