MCPcopy
hub / github.com/rspeer/python-ftfy / test_russian_crash

Function test_russian_crash

tests/test_encodings.py:14–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13
14def test_russian_crash():
15 thebytes = b"\xe8\xed\xe2\xe5\xed\xf2\xe0\xf0\xe8\xe7\xe0\xf6\xe8\xff "
16 # We don't care what the result is, but this shouldn't crash
17 thebytes.decode("utf-8-variants", "replace")
18
19 # This shouldn't crash either
20 guess_bytes(thebytes)

Callers

nothing calls this directly

Calls 2

guess_bytesFunction · 0.90
decodeMethod · 0.45

Tested by

no test coverage detected