diff options
author | Steven Knight <knight@baldmt.com> | 2004-03-12 13:24:18 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-03-12 13:24:18 (GMT) |
commit | ffb0263b87f3917dba0ecbfca4e26ab3185f2a0e (patch) | |
tree | ce7ad48e3d0e7cd9708904c8ceedad4da4125090 /src/engine/SCons/EnvironmentTests.py | |
parent | 6d50f255919fb9f7d2e7742c423f3cc563a60372 (diff) | |
download | SCons-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.py | 15 |
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: |