]> granicus.if.org Git - python/commitdiff
Enable this test only when subprocess supports non-ascii arguments.
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Wed, 12 Nov 2008 00:59:11 +0000 (00:59 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Wed, 12 Nov 2008 00:59:11 +0000 (00:59 +0000)
(it is about parsing the python command line arguments, not about subprocess)

Lib/test/test_cmd_line.py

index 1277df3ffe1ef12ed8c92aeb281cbc9bfa43dde2..e8db7d07aea118efbdfd285fd2f45f858236cd6b 100644 (file)
@@ -136,12 +136,11 @@ class CmdLineTest(unittest.TestCase):
             0)
 
         # Test handling of non-ascii data
-        if test.support.verbose:
-            print("FileSystemEncoding:", sys.getfilesystemencoding())
-        command = "assert(ord('\xe9') == 0xe9)"
-        self.assertEqual(
-            self.exit_code('-c', command),
-            0)
+        if sys.getfilesystemencoding() != 'ascii':
+            command = "assert(ord('\xe9') == 0xe9)"
+            self.assertEqual(
+                self.exit_code('-c', command),
+                0)
 
 
 def test_main():