mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#5924: on Windows, a large PYTHONPATH (more than 255 chars) was completely ignored.
Will backport to 3.0.
This commit is contained in:
parent
5b4a54c5d5
commit
66f8c43b09
3 changed files with 21 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue