importlib_resources icon indicating copy to clipboard operation
importlib_resources copied to clipboard

Fix functional API tests to be endian-agnostic

Open mgorny opened this issue 1 year ago • 0 comments

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

mgorny avatar Jul 10 '24 05:07 mgorny