(term: str, text: str, verbose: int = 0)
| 87 | |
| 88 | |
| 89 | def _notin_text(term: str, text: str, verbose: int = 0) -> Iterator[str]: |
| 90 | index = text.find(term) |
| 91 | head = text[:index] |
| 92 | tail = text[index + len(term) :] |
| 93 | correct_text = head + tail |
| 94 | diff = _diff_text(text, correct_text, dummy_highlighter, verbose) |
| 95 | yield f"{saferepr(term, maxsize=42)} is contained here:" |
| 96 | for line in diff: |
| 97 | if line.startswith("Skipping"): |
| 98 | continue |
| 99 | if line.startswith("- "): |
| 100 | continue |
| 101 | if line.startswith("+ "): |
| 102 | yield " " + line[2:] |
| 103 | else: |
| 104 | yield line |
no test coverage detected