o2o-plagiarism-ai/tests/test_clean_ai_samples.py

13 lines
551 B
Python

from scripts.clean_ai_samples import rejection_reason
def test_rejects_assistant_greeting_and_prompt_leak():
body = "삶을 돌아보며 기억을 적었다. " * 30
assert rejection_reason("안녕하세요. " + body, 100, 2000, 0.5) == "assistant_greeting"
assert rejection_reason(body + " 본문만 출력", 100, 2000, 0.5) == "prompt_leak"
def test_accepts_clean_korean_prose():
body = "삶을 돌아보며 그날의 기억과 가족의 목소리를 기록했다. " * 20
assert rejection_reason(body, 100, 2000, 0.5) is None