aboutsummaryrefslogtreecommitdiff
path: root/tests/TestConfigLoaders.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/TestConfigLoaders.py')
-rw-r--r--tests/TestConfigLoaders.py7
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()