gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests#117569
gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests#117569encukou merged 1 commit into
Conversation
… tests To test the `errors` argument, we read a UTF-16 file as UTF-8 with "backslashreplace" error handling. However, the utf-16 codec adds an endian-specific byte-order mark, so on big-endian machines the expectation doesn't match the test file (which was saved on a little-endian machine). Use endswith to ignore the BOM.
|
!buildbot s390x |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 26ae210 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
|
@encukou Out of interest, was the |
Sorry, something went wrong.
… tests (pythonGH-117569) pythongh-116609: Ignore UTF-16 BOM in importlib.resources._functional tests To test the `errors` argument, we read a UTF-16 file as UTF-8 with "backslashreplace" error handling. However, the utf-16 codec adds an endian-specific byte-order mark, so on big-endian machines the expectation doesn't match the test file (which was saved on a little-endian machine). Use endswith to ignore the BOM.
|
This change needs to be applied to importlib_resources. It looks like a related issue was reported in python/importlib_resources#312. |
Sorry, something went wrong.
Closes #312. Closes #313. Ref python/cpython#117569
To test the
errorsargument, we read a UTF-16 file as UTF-8 with "backslashreplace" error handling. However, the utf-16 codec adds an endian-specific byte-order mark, so on big-endian machines the expectation doesn't match the test file (which was saved on a little-endian machine).Use endswith to ignore the BOM.