diff options
Diffstat (limited to 'src/engine/SCons/Variables/VariablesTests.py')
| -rw-r--r-- | src/engine/SCons/Variables/VariablesTests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py index 3888d19..7f2a978 100644 --- a/src/engine/SCons/Variables/VariablesTests.py +++ b/src/engine/SCons/Variables/VariablesTests.py @@ -273,6 +273,22 @@ class VariablesTestCase(unittest.TestCase): opts.Update(env, {}) assert 'ANSWER' not in env + def test_noaggregation(self): + """Test that the 'files' and 'args' attributes of the Variables class + don't aggregate entries from one instance to another. + This used to be a bug in SCons version 2.4.1 and earlier. + """ + + opts = SCons.Variables.Variables() + opts.files.append('custom.py') + opts.args['ANSWER'] = 54 + nopts = SCons.Variables.Variables() + + # Ensure that both attributes are initialized to + # an empty list and dict, respectively. + assert len(nopts.files) == 0 + assert len(nopts.args) == 0 + def test_args(self): """Test updating an Environment with arguments overridden""" |
