1. SCons
  2. Core
  3. SCons

Source

SCons / test / overrides.py

Diff from to

File test/overrides.py

  • Ignore whitespace
 test = TestSCons.TestSCons()
 
 
-python = TestSCons.python
+_python_ = TestSCons._python_
 
 test.write('SConstruct', """
 env = Environment(CCFLAGS='-DFOO', LIBS=['a'])
 test.write('SConstruct', """
 env = Environment()
 env.Program('hello', 'hello.c',
-            CC=r'%s mycc.py',
-            LINK=r'%s mylink.py',
+            CC=r'%(_python_)s mycc.py',
+            LINK=r'%(_python_)s mylink.py',
             OBJSUFFIX='.not_obj',
             PROGSUFFIX='.not_exe')
-"""%(python,python))
+""" % locals())
 
 test.write('hello.c',"this ain't no c file!\n")
 
 test.write('SConstruct', """\
 env = Environment()
 env.Program('goodbye', 'goodbye.c',
-            CC=r'%s mycc.py',
-            LINK=r'%s mylink.py',
+            CC=r'%(_python_)s mycc.py',
+            LINK=r'%(_python_)s mylink.py',
             OBJSUFFIX='.not_obj',
             PROGSUFFIX='.not_exe',
             targets='ttt',
             sources='sss')
-""" % (python, python))
+""" % locals())
 
 test.write('goodbye.c',"this ain't no c file!\n")