[Python-3000-checkins] r67193 - python/branches/py3k/Lib/test/test_cmd_line.py

amaury.forgeotdarc python-3000-checkins at python.org
Wed Nov 12 01:59:11 CET 2008


Author: amaury.forgeotdarc
Date: Wed Nov 12 01:59:11 2008
New Revision: 67193

Log:
Enable this test only when subprocess supports non-ascii arguments.

(it is about parsing the python command line arguments, not about subprocess)


Modified:
   python/branches/py3k/Lib/test/test_cmd_line.py

Modified: python/branches/py3k/Lib/test/test_cmd_line.py
==============================================================================
--- python/branches/py3k/Lib/test/test_cmd_line.py	(original)
+++ python/branches/py3k/Lib/test/test_cmd_line.py	Wed Nov 12 01:59:11 2008
@@ -136,12 +136,11 @@
             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():


More information about the Python-3000-checkins mailing list