Kaydet (Commit) 30ba25b8 authored tarafından Victor Stinner's avatar Victor Stinner

Merged revisions 80116 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r80116 | victor.stinner | 2010-04-16 17:10:27 +0200 (ven., 16 avril 2010) | 2 lines

  Issue #7605: Fix test_cmd_line if the current working directory is not ASCII
........
üst ec51d03e
...@@ -176,7 +176,15 @@ class CmdLineTest(unittest.TestCase): ...@@ -176,7 +176,15 @@ class CmdLineTest(unittest.TestCase):
path1 = "ABCDE" * 100 path1 = "ABCDE" * 100
path2 = "FGHIJ" * 100 path2 = "FGHIJ" * 100
env['PYTHONPATH'] = path1 + os.pathsep + path2 env['PYTHONPATH'] = path1 + os.pathsep + path2
p = _spawn_python('-S', '-c', 'import sys; print(sys.path)')
code = """
import sys
path = ":".join(sys.path)
path = path.encode("ascii", "backslashreplace")
sys.stdout.buffer.write(path)"""
code = code.strip().splitlines()
code = '; '.join(code)
p = _spawn_python('-S', '-c', code)
stdout, _ = p.communicate() stdout, _ = p.communicate()
self.assertTrue(path1.encode('ascii') in stdout) self.assertTrue(path1.encode('ascii') in stdout)
self.assertTrue(path2.encode('ascii') in stdout) self.assertTrue(path2.encode('ascii') in stdout)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment