Skip to content

Conversation

@mgorny
Copy link

Fix the "backslashreplace" tests for the functional API to be endian-agnostic. The tests used to rely on .encode("utf-16") producing the same data as found in the test file. However, on big endian platforms it would produce a big endian encoding, while the test file is little endian. To avoid the problem, explicitly specify utf-16-le encoding. Since this meant that the BOM is no longer produced, explicitly include it in input.

Fixes#312

Fix the "backslashreplace" tests for the functional API to be endian-agnostic. The tests used to rely on `.encode("utf-16")` producing the same data as found in the test file. However, on big endian platforms it would produce a big endian encoding, while the test file is little endian. To avoid the problem, explicitly specify `utf-16-le` encoding. Since this meant that the BOM is no longer produced, explicitly include it in input. Fixespython#312
@jaraco
Copy link
Member

Thanks for the contrib, and sorry I didn't see it sooner. This was superseded by 8c274e5.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

importlib_resources/tests/test_functional.py test failures on big endian architectures

2 participants

@mgorny@jaraco