Mercurial > hg > pyloader
diff 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 |
line wrap: on
line diff
--- a/tests/objects.py Thu Jun 09 18:40:52 2011 -0700 +++ b/tests/objects.py Sat Jun 11 14:53:07 2011 -0700 @@ -35,6 +35,16 @@ return values[retval] return retval +class ArgsPrinter(object): + def __init__(self, *args, **kwargs): + self.args = args + self.kwargs = kwargs + def __call__(self): + for arg in self.args: + print arg + for kwarg in sorted(self.kwargs): + print kwarg + ": " + self.kwargs[kwarg] + def wrap(app, **values): return Wrapper(app, **values)