[Python-checkins] r85749 - python/branches/issue4388/Lib/test/test_cmd_line.py

victor.stinner python-checkins at python.org
Wed Oct 20 17:42:06 CEST 2010


Author: victor.stinner
Date: Wed Oct 20 17:42:06 2010
New Revision: 85749

Log:
test_cmd_line: env keyword is for assert_python_ok(), not print()

Thanks Nick :-)


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

Modified: python/branches/issue4388/Lib/test/test_cmd_line.py
==============================================================================
--- python/branches/issue4388/Lib/test/test_cmd_line.py	(original)
+++ python/branches/issue4388/Lib/test/test_cmd_line.py	Wed Oct 20 17:42:06 2010
@@ -104,8 +104,7 @@
             if test.support.verbose:
                 import locale
                 print('locale encoding = %s, filesystem encoding = %s'
-                      % (locale.getpreferredencoding(), sys.getfilesystemencoding()),
-                      env=env)
+                      % (locale.getpreferredencoding(), sys.getfilesystemencoding()))
             env = os.environ.copy()
             for key in ('LC_ALL', 'LC_CTYPE', 'LANG'):
                 try:
@@ -113,7 +112,7 @@
                 except KeyError:
                     pass
             command = "assert(ord('\xe9') == 0xe9)"
-            assert_python_ok('-c', command)
+            assert_python_ok('-c', command, env=env)
 
     def test_unbuffered_output(self):
         # Test expected operation of the '-u' switch


More information about the Python-checkins mailing list