MCPcopy
hub / github.com/pallets/click / test_open_file_respects_ignore

Function test_open_file_respects_ignore

tests/test_utils.py:708–714  ·  view source on GitHub ↗
(runner)

Source from the content-addressed store, hash-verified

706
707
708def test_open_file_respects_ignore(runner):
709 with runner.isolated_filesystem():
710 with open("test.txt", "w") as f:
711 f.write("Hello world!")
712
713 with click.open_file("test.txt", encoding="utf8", errors="ignore") as f:
714 assert f.errors == "ignore"
715
716
717def test_open_file_ignore_invalid_utf8(runner):

Callers

nothing calls this directly

Calls 3

openFunction · 0.85
isolated_filesystemMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected