| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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 python#312
|
Thanks for the contrib, and sorry I didn't see it sooner. This was superseded by 8c274e5. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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