Hi py-dev! i am currently hammering on the svn/py/branch/event branch [*]. The main intention is to modify py.test's internal architecture towards using events and to base reporting and some internal processing on these events. Here is the basic event loop (exposed as py.event.Hub for now):
class Hub(list): """ General Event Hub """ def notify(self, event): for subscriber in self: subscriber(event) This is inspired by a talk from Jim Fulton about zope3's event loop - zope.event just contains a global list and a notify function like the above. However, i'd like to keep things more local for now (going global is usually much easier than going local, to begin with and local state is also nicer for TDD) For py.test the upcoming event archicture should allow us to e.g.: * have co-existing reporters e.g. one that writes test results to an internal database and one that provides terminal reporting. * Or one terminal and one html-output reporter. * GUI based reporters (where we can easily route events to GUI loops) * Or a small plugin that allows to automatically copy failure information to e.g. http://paste.pocoo.org/. * ... I am also using the event branch to do various cleanups and refactorings, mainly i am aiming at refactoring distributed and remote testing to share more code (and Events) with local testing. I hope that in the end one can write a reporter that does not need to care (too much) how tests are/were distributed across machines. best & cheers, holger [*] In fact i am working there in py/test2 - which is a branch itself of py/test. I did this (with the help of the py/bin/_maketest2.py helper, btw) in order to be able to use py.test for refactoring py.test. Otherwise if i change files in py/test/ and try to run py.test it would affect my very own test run, making TDD hard or impossible. -- Holger Krekel - freelance manager and programmer merlinux GmbH: http://merlinux.de py.test: http://pytest.org py lib: http://pylib.org PyPy: http://codespeak.net/pypy _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev