Skip to content

Commit

Permalink
tests/test_textextract.py:test_2954(): avoid UnicodeEncodeError on Wi…
Browse files Browse the repository at this point in the history
…ndows.
  • Loading branch information
julian-smith-artifex-com committed Jan 10, 2024
1 parent 64e253c commit 925a080
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_textextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ def get(flags=None):
assert len(text) == 1
text = text[0]
n_fffd = text.count(chr(0xfffd))
print(f'{flags=} {n_fffd=} {text=}')
if 0:
# This print() fails on Windows with UnicodeEncodeError.
print(f'{flags=} {n_fffd=} {text=}')
return text, n_fffd

text_none, n_fffd_none = get()
Expand Down

0 comments on commit 925a080

Please sign in to comment.