diff options
author | Steven Knight <knight@baldmt.com> | 2005-12-16 12:11:01 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-12-16 12:11:01 (GMT) |
commit | 12c9ca505ccc4a4cf0a10100984913aa03b9f41f (patch) | |
tree | b0c2cac4f046d9461ef9e1910e22acb84fa3d99e /src/engine/SCons/Node/AliasTests.py | |
parent | 4b78cf9715b9c9bf96cdf909828533fc8eca0827 (diff) | |
download | SCons-12c9ca505ccc4a4cf0a10100984913aa03b9f41f.zip SCons-12c9ca505ccc4a4cf0a10100984913aa03b9f41f.tar.gz SCons-12c9ca505ccc4a4cf0a10100984913aa03b9f41f.tar.bz2 |
Checkpoint minor refactorings en route to signature refactoring.
Diffstat (limited to 'src/engine/SCons/Node/AliasTests.py')
-rw-r--r-- | src/engine/SCons/Node/AliasTests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/AliasTests.py b/src/engine/SCons/Node/AliasTests.py index 417cc2b..9a12766 100644 --- a/src/engine/SCons/Node/AliasTests.py +++ b/src/engine/SCons/Node/AliasTests.py @@ -48,6 +48,25 @@ class AliasTestCase(unittest.TestCase): a2 = ans.Alias('a1') assert a1 is a2, (a1, a2) + def test_get_contents(self): + """Test the get_contents() method + """ + class DummyNode: + def __init__(self, contents): + self.contents = contents + def get_contents(self): + return self.contents + + ans = SCons.Node.Alias.AliasNameSpace() + + ans.Alias('a1') + a = ans.lookup('a1') + + a.sources = [ DummyNode('one'), DummyNode('two'), DummyNode('three') ] + + c = a.get_contents() + assert c == 'onetwothree', c + def test_lookup(self): """Test the lookup() method """ |