[Checkins] SVN: zc.buildout/trunk/src/zc/buildout/testing.py Set the COLUMNS environment variable to get consistent optparse help
Jim Fulton
jim at zope.com
Sun Feb 28 14:40:48 EST 2010
Log message for revision 109513:
Set the COLUMNS environment variable to get consistent optparse help
and avoid spurious test failures.
Changed:
U zc.buildout/trunk/src/zc/buildout/testing.py
-=-
Modified: zc.buildout/trunk/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/testing.py 2010-02-28 19:35:47 UTC (rev 109512)
+++ zc.buildout/trunk/src/zc/buildout/testing.py 2010-02-28 19:40:47 UTC (rev 109513)
@@ -90,12 +90,16 @@
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)
More information about the checkins
mailing list