'function(value) equals output. If output is None, function(value)
equals value.'

def check_output(self, function, value, output=None):

    if (output is None):
        output = value
    self.assertEqual(function(value), output)
