]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests (GH-117569)
authorPetr Viktorin <encukou@gmail.com>
Fri, 5 Apr 2024 15:00:29 +0000 (17:00 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Apr 2024 15:00:29 +0000 (17:00 +0200)
commit4d4a6f1b6aea6dae131ac116f1735a38c3e32cd1
tree01315985ca13318fca0d1db53934879cc20ea2e0
parent687616877ba540a44f82ff764b5f13d36c0f3910
gh-116608: Ignore UTF-16 BOM in importlib.resources._functional tests (GH-117569)

gh-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.
Lib/test/test_importlib/resources/test_functional.py