summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-10-12 01:34:03 (GMT)
committerGitHub <noreply@github.com>2017-10-12 01:34:03 (GMT)
commitdcddd56ac238f641db90390fc510a787f93150fd (patch)
treeea084d62b99e908dcea33ca8dccaecb2b2ffc551
parent645e552e21cbb5513e686cf7dc665eccc1f46826 (diff)
parentc05da53b5da73768c8026fc0b3ae3c79e2d0f8cb (diff)
downloadSCons-dcddd56ac238f641db90390fc510a787f93150fd.zip
SCons-dcddd56ac238f641db90390fc510a787f93150fd.tar.gz
SCons-dcddd56ac238f641db90390fc510a787f93150fd.tar.bz2
Merge pull request #13 from bdbaddog/add_cmp_to_compat
Fix tests where the GenerateHelpText() sort function was never correc…
-rw-r--r--test/Deprecated/Options/Options.py4
-rw-r--r--test/Variables/Variables.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/Deprecated/Options/Options.py b/test/Deprecated/Options/Options.py
index e415739..f196b79 100644
--- a/test/Deprecated/Options/Options.py
+++ b/test/Deprecated/Options/Options.py
@@ -334,8 +334,8 @@ opts.Add('UNSPECIFIED',
env = Environment(options=opts)
-def compare(a,b):
- return a < b
+def compare(a, b):
+ return (a > b) - (a < b)
Help('Variables settable in custom.py or on the command line:\\n' + opts.GenerateHelpText(env,sort=compare))
diff --git a/test/Variables/Variables.py b/test/Variables/Variables.py
index 17b33af..0fe3745 100644
--- a/test/Variables/Variables.py
+++ b/test/Variables/Variables.py
@@ -320,8 +320,8 @@ opts.Add('UNSPECIFIED',
env = Environment(variables=opts)
-def compare(a,b):
- return a < b
+def compare(a, b):
+ return (a > b) - (a < b)
Help('Variables settable in custom.py or on the command line:\\n' + opts.GenerateHelpText(env,sort=compare))