diff options
author | rcoh <rcoh@mit.edu> | 2011-02-09 12:14:27 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-02-09 12:14:27 -0500 |
commit | b45b9079c5decd720d8275378bb0d6dc172c6234 (patch) | |
tree | 9e8df9308191bb687d14c3df8bb5078b51ba6059 /tests | |
parent | 03d08792f437e1ce93dc0cbfa997025029c8e74e (diff) |
Early stages of support for interbehavior interactions. Fixed a bug in the config eval and added
some new tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestConfigLoaders.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/TestConfigLoaders.py b/tests/TestConfigLoaders.py index c7e2b7a..02c8865 100644 --- a/tests/TestConfigLoaders.py +++ b/tests/TestConfigLoaders.py @@ -37,5 +37,12 @@ class TestConfigLoaders(unittest.TestCase): assert singleLayerLambda({'Val':2}) == 10 doubleLayerLambda = Config.attemptEval("${Val1}$*'${Val2}$'") assert doubleLayerLambda({'Val1':3})({'Val2':7}) == 21 + + conditional = Config.attemptEval("${Val1}$*5=='${Val2}$'") + assert conditional({'Val1':5})({'Val2':25}) == True + assert conditional({'Val1':5})({'Val2':26}) == False + + onlyDouble = Config.attemptEval("'${Val1}$'*'${Val2}$'") + assert onlyDouble({})({'Val1':3, 'Val2':7}) == 21 if __name__ == '__main__': unittest.main() |