Add test for random_expression and underscore

This commit is contained in:
Benjamin Bertrand 2016-01-17 18:06:42 +03:00
parent 1404c6fa35
commit 89b81f97c8

View File

@ -17,6 +17,17 @@ def test_only_form():
assert set(rdExp._gene_varia.keys()) == {'a'}
assert set(rdExp._gene_2replaced.keys()) == {'a'}
def test_form_with_underscores():
form = "_ + 2*_"
rdExp = RdExpression(form)
assert rdExp._letters == {'A', 'B'}
assert rdExp._2replaced == {'A', 'B'}
rdExp()
assert set(rdExp._gene_varia.keys()) == {'A', 'B'}
assert set(rdExp._gene_2replaced.keys()) == {'A', 'B'}
def test_only_form_calc():
form = "{a+b} + 2"
rdExp = RdExpression(form)