Files
requests3/tests
Martijn Pieters e26ccb34eb Fix the smoke test in the face of UTF-16 surrogate pairs.
If the random data starts with a UTF-16 BOM *and* the next two bytes are for a character in the `\ud800`-`\udfff` range decoding would fail. Small chance, but still possible.

Extend it to check the UTF-8 error as well. The goal is to test that the guesser was *mostly* correct, and to verify the cases where it wasn't that it was to be expected. Most of all that the function doesn't buckle under wildly unexpected data.
2012-10-26 12:15:27 +02:00
..