X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=test%2Foption%2Fhelp-options.py;fp=test%2Foption%2Fhelp-options.py;h=0f4dd4d6d06a9da78b6285bc666f30cb0985b688;hb=11e8e47454040247b5524a7d00358eb767e7c3c0;hp=9a87306885690dcda9579a63155b0c6e08653b71;hpb=2f2b02e12600ea18721083366a1e414a3a80c444;p=scons.git diff --git a/test/option/help-options.py b/test/option/help-options.py index 9a873068..0f4dd4d6 100644 --- a/test/option/help-options.py +++ b/test/option/help-options.py @@ -21,6 +21,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -29,7 +30,6 @@ Verify behavior of the -H and --help-options options. """ import re -import string import TestSCons @@ -53,13 +53,13 @@ test.must_contain_all_lines(test.stdout(), expect) ignored_re = re.compile('.*Ignored for compatibility\\.\n', re.S) stdout = ignored_re.sub('', test.stdout()) -lines = string.split(stdout, '\n') -lines = filter(lambda x: x[:3] == ' -', lines) -lines = map(lambda x: x[3:], lines) -lines = map(lambda x: x[0] == '-' and x[1:] or x, lines) -options = map(lambda x: string.split(x)[0], lines) -options = map(lambda x: x[-1] == ',' and x[:-1] or x, options) -lowered = map(lambda x: string.lower(x), options) +lines = stdout.split('\n') +lines = [x for x in lines if x[:3] == ' -'] +lines = [x[3:] for x in lines] +lines = [x[0] == '-' and x[1:] or x for x in lines] +options = [x.split()[0] for x in lines] +options = [x[-1] == ',' and x[:-1] or x for x in options] +lowered = [x.lower() for x in options] sorted = lowered[:] sorted.sort() if lowered != sorted: