MCPcopy Create free account
hub / github.com/codespell-project/codespell / test_default_word_parsing

Function test_default_word_parsing

codespell_lib/tests/test_basic.py:197–210  ·  view source on GitHub ↗
(
    tmp_path: Path,
    capsys: pytest.CaptureFixture[str],
)

Source from the content-addressed store, hash-verified

195
196
197def test_default_word_parsing(
198 tmp_path: Path,
199 capsys: pytest.CaptureFixture[str],
200) -> None:
201 fname = tmp_path / "backtick"
202 with fname.open("a") as f:
203 f.write("`abandonned`\n")
204 assert cs.main(fname) == 1, "bad"
205
206 fname = tmp_path / "apostrophe"
207 fname.write_text("woudn't\n", encoding="utf-8") # U+0027
208 assert cs.main(fname) == 1, "misspelling containing typewriter apostrophe U+0027"
209 fname.write_text("woudn’t\n", encoding="utf-8") # U+2019 # noqa: RUF001
210 assert cs.main(fname) == 1, "misspelling containing typographic apostrophe U+2019"
211
212
213def test_bad_glob(

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
mainMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…