better-exceptions
better-exceptions copied to clipboard
Travis builds do not tests ascii encoding
See for example: Job #30.5
We can see a warning in the logs:
./test_all.sh: line 52: warning: setlocale: LC_ALL: cannot change locale (en_US.ascii)
So I guess it is still testing with default UTF-8.
I do not know how to fix that unfortunately.
I think we should move to Docker + CircleCI for testing. I can do this sometime in the coming weeks - it's fairly straightforward and gives us more control on a more stable platform (I have pretty much completely given up on Travis anymore).
@Qix- I suppose once one is used to Docker + CircleCI, it become as easy as setup than Travis.
Two things to add:
- Actually, current Travis CI do test both ascii and utf8 encodings, contrary to what I what I feared when opening this issue. There is a warning message though, but I guess it resets or deletes the locales, resulting with Python using the default
asciiencoding as wished. - There is a way to get ride of the warning if we would use
STREAM.encodinginstead ofsys.getpreferredencoding(), and setting thePYTHONIOENCODINGenvironment variable adequately for the tests. I don't know really what is the difference betweengetpreferredencoding()andstderr.encoding, but maybe this would also solve issues such as #53