summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/EnvironmentTests.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-26 13:46:18 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-26 13:46:18 (GMT)
commitad5b73702125ef8deadf2231bb804e54ac128399 (patch)
treedd54eb9e13de5d37da463c6540ee04f5491773b7 /src/engine/SCons/EnvironmentTests.py
parent7318c163cf3f9e5a3c17404ef8bec15454b9766b (diff)
downloadSCons-ad5b73702125ef8deadf2231bb804e54ac128399.zip
SCons-ad5b73702125ef8deadf2231bb804e54ac128399.tar.gz
SCons-ad5b73702125ef8deadf2231bb804e54ac128399.tar.bz2
Change the env.Dictionary to an access method for an env._dict attribute.
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r--src/engine/SCons/EnvironmentTests.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 149ba74..0488173 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -75,9 +75,9 @@ class EnvironmentTestCase(unittest.TestCase):
assert env1 == env1copy
env3 = env1.Copy(XXX = 'x3', ZZZ = 'z3')
- assert env3.Dictionary['XXX'] == 'x3'
- assert env3.Dictionary['YYY'] == 'y'
- assert env3.Dictionary['ZZZ'] == 'z3'
+ assert env3.Dictionary('XXX') == 'x3'
+ assert env3.Dictionary('YYY') == 'y'
+ assert env3.Dictionary('ZZZ') == 'z3'
assert env1 == env1copy
def test_Dictionary(self):
@@ -86,10 +86,14 @@ class EnvironmentTestCase(unittest.TestCase):
Fetch them from the Dictionary and check for well-known
defaults that get inserted.
"""
- env = Environment(XXX = 'x', YYY = 'y')
- assert env.Dictionary['XXX'] == 'x'
- assert env.Dictionary['YYY'] == 'y'
- assert env.Dictionary.has_key('BUILDERS')
+ env = Environment(XXX = 'x', YYY = 'y', ZZZ = 'z')
+ assert env.Dictionary('XXX') == 'x'
+ assert env.Dictionary('YYY') == 'y'
+ assert env.Dictionary('XXX', 'ZZZ') == ['x', 'z']
+ xxx, zzz = env.Dictionary('XXX', 'ZZZ')
+ assert xxx == 'x'
+ assert zzz == 'z'
+ assert env.Dictionary().has_key('BUILDERS')
def test_Environment(self):
"""Test construction Environments creation