Author: Hakan Ardo <ha...@debian.org> Branch: jit-targets Changeset: r50200:4c76bc680c2f Date: 2011-12-06 08:34 +0100 http://bitbucket.org/pypy/pypy/changeset/4c76bc680c2f/
Log: suport for setup_class and teardown_class diff --git a/pypy/jit/metainterp/test/test_memmgr.py b/pypy/jit/metainterp/test/test_memmgr.py --- a/pypy/jit/metainterp/test/test_memmgr.py +++ b/pypy/jit/metainterp/test/test_memmgr.py @@ -241,10 +241,17 @@ if __name__ == '__main__': # occurs in the subprocess for test in [_TestMemoryManager(), _TestIntegration()]: - for name in dir(test): - if name.startswith('test_'): - print - print '-'*79 - print '----- Now running test', name, '-----' - print - getattr(test, name)() + if hasattr(test, 'setup_class'): + test.setup_class() + try: + for name in dir(test): + if name.startswith('test_'): + print + print '-'*79 + print '----- Now running test', name, '-----' + print + getattr(test, name)() + finally: + if hasattr(test, 'teardown_class'): + test.teardown_class() + _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit