circuitpython/tests/unicode/file_invalid.py
Jim Mussared bd4e45fd68 tests/unicode: Add test for invalid utf-8 file contents.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-26 16:47:27 +10:00

6 lines
130 B
Python

try:
f = open("unicode/data/utf-8_invalid.txt", encoding="utf-8")
f.read()
except UnicodeError:
print("UnicodeError")