(term: str, text: str, verbose: int = 0)
| 474 | |
| 475 | |
| 476 | def _notin_text(term: str, text: str, verbose: int = 0) -> List[str]: |
| 477 | index = text.find(term) |
| 478 | head = text[:index] |
| 479 | tail = text[index + len(term) :] |
| 480 | correct_text = head + tail |
| 481 | diff = _diff_text(text, correct_text, verbose) |
| 482 | newdiff = ["%s is contained here:" % saferepr(term, maxsize=42)] |
| 483 | for line in diff: |
| 484 | if line.startswith("Skipping"): |
| 485 | continue |
| 486 | if line.startswith("- "): |
| 487 | continue |
| 488 | if line.startswith("+ "): |
| 489 | newdiff.append(" " + line[2:]) |
| 490 | else: |
| 491 | newdiff.append(line) |
| 492 | return newdiff |
| 493 | |
| 494 | |
| 495 | def running_on_ci() -> bool: |
no test coverage detected