fix test suite (sys.stdout.encoding is None when running via test suite)