squid-main-space / tests /test_ocean_date_default_v453.py
Zin299's picture
Deploy v4.6.1 upstream download refresh retry
0d11aa0
Raw
History Blame
871 Bytes
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
def test_version():
assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.6.1"
def test_missing_date_never_defaults_to_today():
rt=(ROOT/"services"/"chat_runtime.py").read_text(encoding="utf-8")
assert "def _ocean_missing_date_guidance" in rt
assert "平台不会再把“今天”自动作为默认日期" in rt
assert "missing_date_guidance" in rt
def test_latest_today_are_explicit_intents():
rt=(ROOT/"services"/"chat_runtime.py").read_text(encoding="utf-8")
assert "def _ocean_prompt_explicitly_requests_current_or_latest" in rt
assert "今天|今日|当前|现在|最新|最近可用" in rt
def test_system_prompt_forbids_implicit_today():
ui=(ROOT/"ui_server.py").read_text(encoding="utf-8")
assert "不得擅自使用系统当天日期" in ui