diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-06-09 21:30:01 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-06-09 21:30:01 (GMT) |
commit | 66f8c43b095a47b90f9887fac233aa7c8e3a3224 (patch) | |
tree | 3015d55aec7fc464516b908a88c2d5c52dca1f17 /Lib | |
parent | 5b4a54c5d5a61375b663b25f2c99ea44219fc793 (diff) | |
download | cpython-66f8c43b095a47b90f9887fac233aa7c8e3a3224.zip cpython-66f8c43b095a47b90f9887fac233aa7c8e3a3224.tar.gz cpython-66f8c43b095a47b90f9887fac233aa7c8e3a3224.tar.bz2 |
#5924: on Windows, a large PYTHONPATH (more than 255 chars) was completely ignored.
Will backport to 3.0.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_cmd_line.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 72edc2e..ef3c109 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -171,6 +171,16 @@ class CmdLineTest(unittest.TestCase): self.assertEqual(rc, 0) self.assert_(data.startswith(b'x'), data) + def test_large_PYTHONPATH(self): + with test.support.EnvironmentVarGuard() as env: + path1 = "ABCDE" * 100 + path2 = "FGHIJ" * 100 + env['PYTHONPATH'] = path1 + os.pathsep + path2 + p = _spawn_python('-S', '-c', 'import sys; print(sys.path)') + stdout, _ = p.communicate() + self.assert_(path1.encode('ascii') in stdout) + self.assert_(path2.encode('ascii') in stdout) + def test_main(): test.support.run_unittest(CmdLineTest) |