Commit a260a0a6 authored by Jim Fulton's avatar Jim Fulton

Set the COLUMNS environment variable to get consistent optparse help

and avoid spurious test failures.
parent 92ada583
......@@ -90,12 +90,16 @@ def write(dir, *args):
MUST_CLOSE_FDS = not sys.platform.startswith('win')
def system(command, input=''):
env = dict(os.environ)
env['COLUMNS'] = '80'
p = subprocess.Popen(command,
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
close_fds=MUST_CLOSE_FDS)
close_fds=MUST_CLOSE_FDS,
env=env,
)
i, o, e = (p.stdin, p.stdout, p.stderr)
if input:
i.write(input)
......
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