summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-02-26 20:49:06 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-02-26 20:49:06 (GMT)
commita9e4f59187b57fe5907d4f19dff3464d1effbc54 (patch)
treec693ecefe4a085f1459d312b45c3a08ae52a2a1b /src/engine
parentf51b065a8e4c009d58038d96b27eb0a6f7fb4189 (diff)
downloadSCons-a9e4f59187b57fe5907d4f19dff3464d1effbc54.zip
SCons-a9e4f59187b57fe5907d4f19dff3464d1effbc54.tar.gz
SCons-a9e4f59187b57fe5907d4f19dff3464d1effbc54.tar.bz2
define cmp() as it's not available on py3 for tests
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Variables/VariablesTests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py
index 7f2a978..69f1e01 100644
--- a/src/engine/SCons/Variables/VariablesTests.py
+++ b/src/engine/SCons/Variables/VariablesTests.py
@@ -49,6 +49,14 @@ class Environment(object):
return key in self.dict
+def cmp(a, b):
+ """
+ Define cmp because it's no longer available in python3
+ Works under python 2 as well
+ """
+ return (a > b) - (a < b)
+
+
def check(key, value, env):
assert int(value) == 6 * 9, "key %s = %s" % (key, repr(value))