Пример #1
0
 def test_resolve_normalization_of_braces(self):
     expected = '()'
     converter = FormulaConverter(variable_addresses={'A': 0})
     for text in ['()', '{}', '[]']:
         actual = converter._normalize(text=text)
         self.assertEqual(actual, expected)
Пример #2
0
 def test_resolve_casual_math_operations_without_variable_conflict(self):
     expected = 'A * B / C'
     converter = FormulaConverter(variable_addresses={'A': 0, 'B': 1, 'C': 2})
     actual = converter._normalize(text='A x B / C')
     self.assertEqual(actual, expected)