no-raw-source-text-test-oracle
Test uses raw text from a source-like project path as its oracle.
Why
Substring and regex checks can pass on comments or unreachable configuration and fail after behavior-preserving formatting changes.
Fix
Parse the artifact, execute its validator, or assert on a runtime contract. If exact bytes or text are the deliberate compatibility contract, use an exact line suppression with the reason.
Examples
from pathlib import Path
def test_policy(): source = Path("workflow.yml").read_text() assert "permissions:" in sourcefrom pathlib import Path
import yaml
def test_policy(): workflow = yaml.safe_load(Path("workflow.yml").read_text()) assert workflow["permissions"]["contents"] == "read"Formerly: source-coupled-test