From d7931095d57b47e48858143dcc174aa17b6dd0b6 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 8 Oct 2010 18:46:09 +0000 Subject: [PATCH] Add some debug output in verbose mode --- Lib/test/test_cmd_line.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index ae252b2a05f..f7e8f2418b6 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -101,6 +101,10 @@ class CmdLineTest(unittest.TestCase): # Test handling of non-ascii data if sys.getfilesystemencoding() != 'ascii': + if test.support.verbose: + import locale + print('locale encoding = %s, filesystem encoding = %s' + % (locale.getpreferredencoding(), sys.getfilesystemencoding())) command = "assert(ord('\xe9') == 0xe9)" assert_python_ok('-c', command)