Browse Source

tests/unicode: Add test for invalid utf-8 file contents.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
pull/6044/merge
Jim Mussared 2 years ago
committed by Damien George
parent
commit
bd4e45fd68
  1. 1
      tests/unicode/data/utf-8_invalid.txt
  2. 5
      tests/unicode/file_invalid.py

1
tests/unicode/data/utf-8_invalid.txt

@ -0,0 +1 @@
aa�bb

5
tests/unicode/file_invalid.py

@ -0,0 +1,5 @@
try:
f = open("unicode/data/utf-8_invalid.txt", encoding="utf-8")
f.read()
except UnicodeError:
print("UnicodeError")
Loading…
Cancel
Save