comparison tests/objects.py @ 78:2449fb4a89c1

rearrange test.ini file to make more sense; write another test class
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 11 Jun 2011 14:53:07 -0700
parents 20bdb8125817
children
comparison
equal deleted inserted replaced
77:efb7a8a189e8 78:2449fb4a89c1
33 values.update(self.values) 33 values.update(self.values)
34 if retval in values: 34 if retval in values:
35 return values[retval] 35 return values[retval]
36 return retval 36 return retval
37 37
38 class ArgsPrinter(object):
39 def __init__(self, *args, **kwargs):
40 self.args = args
41 self.kwargs = kwargs
42 def __call__(self):
43 for arg in self.args:
44 print arg
45 for kwarg in sorted(self.kwargs):
46 print kwarg + ": " + self.kwargs[kwarg]
47
38 def wrap(app, **values): 48 def wrap(app, **values):
39 return Wrapper(app, **values) 49 return Wrapper(app, **values)
40 50
41 def fib(n): 51 def fib(n):
42 """return the nth fibonacci term""" 52 """return the nth fibonacci term"""