"""C2PA provenance reader: abstains on raw strings.""" from text_detection.detectors.provenance import ProvenanceDetector from text_detection.schema import Verdict async def test_raw_string_abstains(): det = ProvenanceDetector() res = await det.detect_text("A plain paragraph with no provenance manifest.") assert res.detector == "text_provenance" assert res.confidence == 0.0 assert res.verdict == Verdict.UNCERTAIN assert res.p_fake == 0.5 # abstain must not move the needle assert res.error is None async def test_empty_text_returns_error(): det = ProvenanceDetector() res = await det.detect_text(" ") assert res.error is not None