[py-svn] r61995 - py/branch/pytestplugin/py/test/plugin

hpk at codespeak.net hpk at codespeak.net
Wed Feb 18 10:51:57 CET 2009


Author: hpk
Date: Wed Feb 18 10:51:53 2009
New Revision: 61995

Modified:
   py/branch/pytestplugin/py/test/plugin/pytest_terminal.py
Log:
port some collection  events


Modified: py/branch/pytestplugin/py/test/plugin/pytest_terminal.py
==============================================================================
--- py/branch/pytestplugin/py/test/plugin/pytest_terminal.py	(original)
+++ py/branch/pytestplugin/py/test/plugin/pytest_terminal.py	Wed Feb 18 10:51:53 2009
@@ -131,7 +131,7 @@
         if error:
             self.write_line("HostDown %s: %s" %(host.hostid, error))
 
-    def rep_ItemStart(self, ev):
+    def pyevent_itemstart(self, ev):
         if self.config.option.verbose:
             info = ev.item.repr_metainfo()
             line = info.verboseline(basedir=self.curdir) + " "
@@ -163,7 +163,7 @@
             line = info.verboseline(basedir=self.curdir) + " "
             self.write_ensure_prefix(line, word)
 
-    def rep_CollectionReport(self, ev):
+    def pyevent_collectionreport(self, ev):
         if not ev.passed:
             #XXX allow plugins to override collection failures? 
             # cat, letter, word = self.getcategoryletterword(ev)
@@ -289,14 +289,14 @@
     def outindent(self, line):
         self.out.line(self.indent + str(line))
 
-    def rep_CollectionStart(self, ev):
+    def pyevent_collectionstart(self, ev):
         self.outindent(ev.collector)
         self.indent += self.INDENT 
     
-    def rep_ItemStart(self, event):
+    def pyevent_itemstart(self, event):
         self.outindent(event.item)
 
-    def rep_CollectionReport(self, ev):
+    def pyevent_collectionreport(self, ev):
         if not ev.passed:
             self.outindent("!!! %s !!!" % ev.longrepr.reprcrash.message)
         self.indent = self.indent[:-len(self.INDENT)]
@@ -588,7 +588,7 @@
            "<Module 'test_collectonly_basic.py'>"
         ])
         item = modcol.join("test_func")
-        rep.config.bus.notify(collectionstart=event.ItemStart(item))
+        rep.config.bus.notify(itemstart=event.ItemStart(item))
         linecomp.assert_contains_lines([
            "  <Function 'test_func'>", 
         ])



More information about the pytest-commit mailing list