importlib_resources
importlib_resources copied to clipboard
Fix functional API tests to be endian-agnostic
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