File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,14 +99,16 @@ def test_run_code(self):
9999 # All good if execution is successful
100100 assert_python_ok ('-c' , 'pass' )
101101
102+ @unittest .skipIf (sys .getfilesystemencoding () == 'ascii' ,
103+ 'need a filesystem encoding different than ASCII' )
104+ def test_non_ascii (self ):
102105 # Test handling of non-ascii data
103- if sys .getfilesystemencoding () != 'ascii' :
104- if test .support .verbose :
105- import locale
106- print ('locale encoding = %s, filesystem encoding = %s'
107- % (locale .getpreferredencoding (), sys .getfilesystemencoding ()))
108- command = "assert(ord('\xe9 ') == 0xe9)"
109- assert_python_ok ('-c' , command )
106+ if test .support .verbose :
107+ import locale
108+ print ('locale encoding = %s, filesystem encoding = %s'
109+ % (locale .getpreferredencoding (), sys .getfilesystemencoding ()))
110+ command = "assert(ord('\xe9 ') == 0xe9)"
111+ assert_python_ok ('-c' , command )
110112
111113 # On Windows, pass bytes to subprocess doesn't test how Python decodes the
112114 # command line, but how subprocess does decode bytes to unicode. Python
You can’t perform that action at this time.
0 commit comments