[py-svn] r50984 - py/branch/reporter-merge/py/test
hpk at codespeak.net
hpk at codespeak.net
Thu Jan 24 18:27:06 CET 2008
Author: hpk
Date: Thu Jan 24 18:27:06 2008
New Revision: 50984
Modified:
py/branch/reporter-merge/py/test/session.py
Log:
avoid reporting hooks on session object
Modified: py/branch/reporter-merge/py/test/session.py
==============================================================================
--- py/branch/reporter-merge/py/test/session.py (original)
+++ py/branch/reporter-merge/py/test/session.py Thu Jan 24 18:27:06 2008
@@ -27,8 +27,9 @@
if not colitems:
break
next = colitems.pop(0)
- if session:
- session.start(next)
+ if reporter:
+ reporter(repevent.ItemStart(next))
+
if isinstance(next, stopitems):
try:
next._skipbykeyword(keyword)
@@ -51,8 +52,8 @@
reporter(repevent.SkippedTryiter(excinfo, next))
else:
reporter(repevent.FailedTryiter(excinfo, next))
- if session:
- session.finish(next)
+ if reporter:
+ reporter(repevent.ItemFinish(next))
class AbstractSession(object):
""" An abstract session executes collectors/items through a runner.
@@ -90,16 +91,6 @@
reporter.was_failure()
return reporter, checkfun
- def start(self, item):
- """ A hook invoked per every item started
- """
- self.reporter(repevent.ItemStart(item))
-
- def finish(self, item):
- """ A hook invoked per every item ending
- """
- self.reporter(repevent.ItemFinish(item))
-
class Session(AbstractSession):
"""
A Session gets test Items from Collectors, executes the
More information about the py-svn
mailing list