summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-03-12 13:24:18 (GMT)
committerSteven Knight <knight@baldmt.com>2004-03-12 13:24:18 (GMT)
commitffb0263b87f3917dba0ecbfca4e26ab3185f2a0e (patch)
treece7ad48e3d0e7cd9708904c8ceedad4da4125090 /src/engine/SCons/EnvironmentTests.py
parent6d50f255919fb9f7d2e7742c423f3cc563a60372 (diff)
downloadSCons-ffb0263b87f3917dba0ecbfca4e26ab3185f2a0e.zip
SCons-ffb0263b87f3917dba0ecbfca4e26ab3185f2a0e.tar.gz
SCons-ffb0263b87f3917dba0ecbfca4e26ab3185f2a0e.tar.bz2
Add an Execute() method.
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r--src/engine/SCons/EnvironmentTests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index d450075..ca0b458 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -1757,6 +1757,21 @@ class EnvironmentTestCase(unittest.TestCase):
assert e2['X'] == 'xxx', e2['X']
assert e2['Y'] == 'yyy', e2['Y']
+ def test_Execute(self):
+ """Test the Execute() method"""
+
+ class MyAction:
+ def __init__(self, *args, **kw):
+ self.args = args
+ def __call__(self, target, source, env):
+ return "%s executed" % self.args
+
+ env = Environment()
+ env.Action = MyAction
+
+ result = env.Execute("foo")
+ assert result == "foo executed", result
+
def test_File(self):
"""Test the File() method"""
class MyFS: