Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e255764

Browse files
committed
Enable this test only when subprocess supports non-ascii arguments.
(it is about parsing the python command line arguments, not about subprocess)
1 parent f4b2712 commit e255764

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Lib/test/test_cmd_line.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,11 @@ def test_run_code(self):
136136
0)
137137

138138
# Test handling of non-ascii data
139-
if test.support.verbose:
140-
print("FileSystemEncoding:", sys.getfilesystemencoding())
141-
command = "assert(ord('\xe9') == 0xe9)"
142-
self.assertEqual(
143-
self.exit_code('-c', command),
144-
0)
139+
if sys.getfilesystemencoding() != 'ascii':
140+
command = "assert(ord('\xe9') == 0xe9)"
141+
self.assertEqual(
142+
self.exit_code('-c', command),
143+
0)
145144

146145

147146
def test_main():

0 commit comments

Comments
 (0)