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

Function test_makepyfile_utf8

testing/test_pytester.py:209–216  ·  view source on GitHub ↗

Ensure makepyfile accepts utf-8 bytes as input (#2738)

(pytester: Pytester)

Source from the content-addressed store, hash-verified

207
208
209def test_makepyfile_utf8(pytester: Pytester) -> None:
210 """Ensure makepyfile accepts utf-8 bytes as input (#2738)"""
211 utf8_contents = """
212 def setup_function(function):
213 mixed_encoding = 'São Paulo'
214 """.encode()
215 p = pytester.makepyfile(utf8_contents)
216 assert "mixed_encoding = 'São Paulo'".encode() in p.read_bytes()
217
218
219class TestInlineRunModulesCleanup:

Callers

nothing calls this directly

Calls 1

makepyfileMethod · 0.45

Tested by

no test coverage detected