"""Tests for #86.2 — pure marker classifiers in scripts/nevo_corpus_audit.py. Distinguishes the harmful editorial-ratio markers (מיני-רציו / מבזק) from benign Nevo citation-list markers (חקיקה שאוזכרה / ספרות). Offline. """ from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "scripts")) import nevo_corpus_audit as n # noqa: E402 def test_has_marker_detects_any_nevo_marker(): assert n._has_marker("חקיקה שאוזכרה: חוק התכנון והבניה") assert n._has_marker("מיני-רציו: העותר לא הוכיח") assert not n._has_marker("פסק-דין רגיל ללא מטא-דאטה של נבו") def test_has_editorial_only_for_holdings_markers(): # editorial = the harmful family (a holdings summary that could be mistaken # for our own extracted holding) assert n._has_editorial("מיני-רציו: ...") assert n._has_editorial("מבזק: בית המשפט קבע") # a bare citation list is NOT editorial — benign assert not n._has_editorial("חקיקה שאוזכרה: חוק התכנון והבניה, סע' 197") assert not n._has_editorial("פסקי דין שאוזכרו: בר\"מ 2340/02")