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

hpk at codespeak.net hpk at codespeak.net
Mon Feb 16 11:06:20 CET 2009


Author: hpk
Date: Mon Feb 16 11:06:15 2009
New Revision: 61942

Modified:
   py/branch/pytestplugin/py/test/plugin/pytest_resultlog.py
Log:
only test resultlog functionality here, not event dispatch


Modified: py/branch/pytestplugin/py/test/plugin/pytest_resultlog.py
==============================================================================
--- py/branch/pytestplugin/py/test/plugin/pytest_resultlog.py	(original)
+++ py/branch/pytestplugin/py/test/plugin/pytest_resultlog.py	Mon Feb 16 11:06:15 2009
@@ -218,20 +218,16 @@
     def test_internal_exception(self):
         # they are produced for example by a teardown failing
         # at the end of the run
-        from py.__.test import event
-        bus = event.EventBus()
-        reslog = ResultLog(StringIO.StringIO())        
-        bus.subscribe(reslog.log_event_to_file)
 
         try:
             raise ValueError
         except ValueError:
             excinfo = py.code.ExceptionInfo()
 
+        from py.__.test import event
         internal = event.InternalException(excinfo)
-
-        bus.notify(internal)
-
+        reslog = ResultLog(StringIO.StringIO())        
+        reslog.log_event_to_file(internal) 
         entry = reslog.logfile.getvalue()
         entry_lines = entry.splitlines()
 



More information about the pytest-commit mailing list