diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-02-27 16:17:11 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-02-27 16:17:11 (GMT) |
commit | b7f27ff9ac4f594c7ec3fe2cca44725cb36ffb2d (patch) | |
tree | d5b93a375cdc32af6ce643f14528f5f37be17da0 /Lib | |
parent | e94b221d5ed5d1f5efc6087623dbbe2916b478bc (diff) | |
download | cpython-b7f27ff9ac4f594c7ec3fe2cca44725cb36ffb2d.zip cpython-b7f27ff9ac4f594c7ec3fe2cca44725cb36ffb2d.tar.gz cpython-b7f27ff9ac4f594c7ec3fe2cca44725cb36ffb2d.tar.bz2 |
Merged revisions 78500 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r78500 | florent.xicluna | 2010-02-27 17:12:22 +0100 (sam, 27 fév 2010) | 2 lines
Use UTF-8 encoding to create Python test scripts.
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_cmd_line_script.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index 7114681..bc87a22 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -62,7 +62,8 @@ print('sys.argv[0]==%r' % sys.argv[0]) def _make_test_script(script_dir, script_basename, source=test_source): script_filename = script_basename+os.path.extsep+'py' script_name = os.path.join(script_dir, script_filename) - script_file = open(script_name, 'w') + # The script should be encoded to UTF-8, the default string encoding + script_file = open(script_name, 'w', encoding='utf-8') script_file.write(source) script_file.close() return script_name |