diff options
| author | Dirk Baechle <dl9obn@darc.de> | 2015-12-14 21:44:58 (GMT) |
|---|---|---|
| committer | Dirk Baechle <dl9obn@darc.de> | 2015-12-14 21:44:58 (GMT) |
| commit | 42ac4c63bd25680c49ff9a7fa6f1e1139d589ced (patch) | |
| tree | 4f345454ffa8d1de1f9a235fe23cce4b644e315f /src/engine/SCons/Variables | |
| parent | e7de9d22c9503cf29e5d8b5e7813f060d59a00e5 (diff) | |
| download | SCons-42ac4c63bd25680c49ff9a7fa6f1e1139d589ced.zip SCons-42ac4c63bd25680c49ff9a7fa6f1e1139d589ced.tar.gz SCons-42ac4c63bd25680c49ff9a7fa6f1e1139d589ced.tar.bz2 | |
- fixed render_tree default argument for "visited" as well
- added tests for the new "visited" default arguments of the render_tree and print_tree methods
- added simple test for the new "None" default arguments in Variables constructor
Diffstat (limited to 'src/engine/SCons/Variables')
| -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 d2110c1..50f7d13 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""" |
