From 24fb46e3d0eb677f6e017fe8a1b6637a3ffc81ee Mon Sep 17 00:00:00 2001 From: lafrite Date: Tue, 25 Nov 2014 10:48:24 +0100 Subject: [PATCH] can't put spaces in {} in random_expression --- test/test_random_expression.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_random_expression.py b/test/test_random_expression.py index bed6114..8dc11e1 100644 --- a/test/test_random_expression.py +++ b/test/test_random_expression.py @@ -22,15 +22,15 @@ class TestRandomExpression(unittest.TestCase): self.assertEqual(set(rdExp._gene_2replaced.keys()), {'a'}) def test_only_form_calc(self): - form = "{a + b} + 2" + form = "{a+b} + 2" rdExp = RdExpression(form) self.assertEqual(rdExp._letters, {'a', 'b'}) - self.assertEqual(rdExp._2replaced, {'a + b'}) + self.assertEqual(rdExp._2replaced, {'a+b'}) rdExp() self.assertEqual(set(rdExp._gene_varia.keys()), {'a', 'b'}) - self.assertEqual(set(rdExp._gene_2replaced.keys()), {'a + b'}) + self.assertEqual(set(rdExp._gene_2replaced.keys()), {'a+b'}) def test_only_form_cond(self): form = "{a} + 2" @@ -78,15 +78,15 @@ class TestRandomExpression(unittest.TestCase): def test_only_form_calc_cond_calc(self): form = "{a*3} * {b}" - cond = ["{a + b} == 3"] + cond = ["{a+b} == 3"] rdExp = RdExpression(form, cond) self.assertEqual(rdExp._letters, {'a', 'b'}) - self.assertEqual(rdExp._2replaced, {'b', 'a*3', 'a + b'}) + self.assertEqual(rdExp._2replaced, {'b', 'a*3', 'a+b'}) rdExp() self.assertEqual(set(rdExp._gene_varia.keys()), {'a', 'b'}) - self.assertEqual(set(rdExp._gene_2replaced.keys()), {'b', 'a*3', 'a + b'}) + self.assertEqual(set(rdExp._gene_2replaced.keys()), {'b', 'a*3', 'a+b'}) self.assertEqual((rdExp._gene_varia['a'] + rdExp._gene_varia['b']), 3)