MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_syntax_error_with_non_ascii_chars

Function test_syntax_error_with_non_ascii_chars

testing/python/collect.py:1337–1341  ·  view source on GitHub ↗

Fix decoding issue while formatting SyntaxErrors during collection (#578).

(pytester: Pytester)

Source from the content-addressed store, hash-verified

1335
1336
1337def test_syntax_error_with_non_ascii_chars(pytester: Pytester) -> None:
1338 """Fix decoding issue while formatting SyntaxErrors during collection (#578)."""
1339 pytester.makepyfile("☃")
1340 result = pytester.runpytest()
1341 result.stdout.fnmatch_lines(["*ERROR collecting*", "*SyntaxError*", "*1 error in*"])
1342
1343
1344def test_collect_error_with_fulltrace(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected