Test custom word regex.
(
tmp_path: Path,
capsys: pytest.CaptureFixture[str],
)
| 494 | |
| 495 | |
| 496 | def test_custom_regex( |
| 497 | tmp_path: Path, |
| 498 | capsys: pytest.CaptureFixture[str], |
| 499 | ) -> None: |
| 500 | """Test custom word regex.""" |
| 501 | (tmp_path / "bad.txt").write_text("abandonned_abondon\n") |
| 502 | assert cs.main(tmp_path) == 0 |
| 503 | assert cs.main("-r", "[a-z]+", tmp_path) == 2 |
| 504 | result = cs.main("-r", "[a-z]+", "--write-changes", tmp_path, std=True) |
| 505 | assert isinstance(result, tuple) |
| 506 | code, _, stderr = result |
| 507 | assert code == EX_USAGE |
| 508 | assert "ERROR:" in stderr |
| 509 | |
| 510 | |
| 511 | def test_exclude_file( |
nothing calls this directly
no test coverage detected
searching dependent graphs…