diff --git a/build_tools/SCons/cxxtest.py b/build_tools/SCons/cxxtest.py index 450b317..dc79826 100644 --- a/build_tools/SCons/cxxtest.py +++ b/build_tools/SCons/cxxtest.py @@ -92,7 +92,7 @@ def multiget(dictlist, key, default = None): dictionaries, the default is returned. """ for dict in dictlist: - if dict.has_key(key): + if key in dict: return dict[key] else: return default @@ -280,9 +280,6 @@ def generate(env, **kwargs): python, docs and other subdirectories. ... and all others that Program() accepts, like CPPPATH etc. """ - - print "Loading CxxTest tool..." - # # Expected behaviour: keyword arguments override environment variables; # environment variables override default settings. @@ -307,11 +304,11 @@ def generate(env, **kwargs): env.SetDefault( CXXTEST_CXXTESTGEN_SCRIPT_NAME = 'cxxtestgen' ) #Here's where keyword arguments are applied - apply(env.Replace, (), kwargs) + env.Replace(**kwargs) #If the user specified the path to CXXTEST, make sure it is correct #otherwise, search for and set the default toolpath. - if (not kwargs.has_key('CXXTEST') or not isValidScriptPath(kwargs['CXXTEST']) ): + if 'CXXTEST' not in kwargs or not isValidScriptPath(kwargs['CXXTEST']): env["CXXTEST"] = findCxxTestGen(env) # find and add the CxxTest headers to the path. @@ -397,4 +394,3 @@ def CxxTest(env, target, source = None, **kwargs): def exists(env): return os.path.exists(env['CXXTEST']) -