'Subsitution of custom functions'

def test_simple_funcs(self):

    variables = {'x': 4.712}
    functions = {'id': (lambda x: x)}
    self.assertEqual(calc.evaluator({}, functions, 'id(2.81)'), 2.81)
    self.assertEqual(calc.evaluator({}, functions, 'id(2.81)'), 2.81)
    self.assertEqual(calc.evaluator(variables, functions, 'id(x)'), 4.712)
    functions.update({'f': numpy.sin})
    self.assertAlmostEqual(calc.evaluator(variables, functions, 'f(x)'), (-1), delta=0.001)
