'Substitution of variables into simple equations'

def test_simple_vars(self):

    variables = {'x': 9.72, 'y': 7.91, 'loooooong': 6.4}
    self.assertEqual(calc.evaluator({'x': 9.72}, {}, '13'), 13)
    self.assertEqual(calc.evaluator({'x': 9.72, 'y': 7.91}, {}, '13'), 13)
    self.assertEqual(calc.evaluator(variables, {}, '13'), 13)
    self.assertEqual(calc.evaluator(variables, {}, 'x'), 9.72)
    self.assertEqual(calc.evaluator(variables, {}, 'y'), 7.91)
    self.assertEqual(calc.evaluator(variables, {}, 'loooooong'), 6.4)
    self.assertAlmostEqual(calc.evaluator(variables, {}, '3*x-y'), 21.25, delta=0.01)
    self.assertAlmostEqual(calc.evaluator(variables, {}, 'x*y'), 76.89, delta=0.01)
    self.assertEqual(calc.evaluator({'x': 9.72, 'y': 7.91}, {}, '13'), 13)
    self.assertEqual(calc.evaluator(variables, {}, '13'), 13)
    self.assertEqual(calc.evaluator({'a': 2.2997471478310274, 'k': 9, 'm': 8, 'x': 0.6600949841121}, {}, '5'), 5)
