better-exceptions icon indicating copy to clipboard operation
better-exceptions copied to clipboard

Travis builds do not tests ascii encoding

Open Delgan opened this issue 8 years ago • 2 comments

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.

Delgan avatar Sep 05 '17 10:09 Delgan

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- avatar Jan 14 '19 14:01 Qix-

@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 ascii encoding as wished.
  • There is a way to get ride of the warning if we would use STREAM.encoding instead of sys.getpreferredencoding(), and setting the PYTHONIOENCODING environment variable adequately for the tests. I don't know really what is the difference between getpreferredencoding() and stderr.encoding, but maybe this would also solve issues such as #53

Delgan avatar Jan 14 '19 20:01 Delgan