[py-svn] r63598 - in py/trunk/py/test: . dist looponfail plugin

hpk at codespeak.net hpk at codespeak.net
Sat Apr 4 02:23:05 CEST 2009


Author: hpk
Date: Sat Apr  4 02:23:04 2009
New Revision: 63598

Modified:
   py/trunk/py/test/dist/dsession.py
   py/trunk/py/test/dist/txnode.py
   py/trunk/py/test/looponfail/remote.py
   py/trunk/py/test/looponfail/util.py
   py/trunk/py/test/plugin/pytest_default.py
   py/trunk/py/test/session.py
Log:
cleanup of imports and shuffling of plugin method.


Modified: py/trunk/py/test/dist/dsession.py
==============================================================================
--- py/trunk/py/test/dist/dsession.py	(original)
+++ py/trunk/py/test/dist/dsession.py	Sat Apr  4 02:23:04 2009
@@ -5,7 +5,6 @@
 """
 
 import py
-from py.__.test import event
 from py.__.test.runner import basic_run_report, basic_collect_report
 from py.__.test.session import Session
 from py.__.test import outcome 
@@ -237,6 +236,7 @@
         self.node2pending[node].remove(item)
 
     def handle_crashitem(self, item, node):
+        from py.__.test import event
         longrepr = "!!! Node %r crashed during running of test %r" %(node, item)
         rep = event.ItemTestReport(item, when="???", excinfo=longrepr)
         rep.node = node

Modified: py/trunk/py/test/dist/txnode.py
==============================================================================
--- py/trunk/py/test/dist/txnode.py	(original)
+++ py/trunk/py/test/dist/txnode.py	Sat Apr  4 02:23:04 2009
@@ -2,10 +2,8 @@
     Manage setup, running and local representation of remote nodes/processes. 
 """
 import py
-from py.__.test import event
 from py.__.test.dist.mypickle import PickleChannel
 
-
 class TXNode(object):
     """ Represents a Test Execution environment in the controlling process. 
         - sets up a slave node through an execnet gateway 

Modified: py/trunk/py/test/looponfail/remote.py
==============================================================================
--- py/trunk/py/test/looponfail/remote.py	(original)
+++ py/trunk/py/test/looponfail/remote.py	Sat Apr  4 02:23:04 2009
@@ -12,7 +12,6 @@
 import py
 from py.__.test.session import Session
 from py.__.test.dist.mypickle import PickleChannel
-from py.__.test import event
 from py.__.test.looponfail import util
 
 class LooponfailingSession(Session):

Modified: py/trunk/py/test/looponfail/util.py
==============================================================================
--- py/trunk/py/test/looponfail/util.py	(original)
+++ py/trunk/py/test/looponfail/util.py	Sat Apr  4 02:23:04 2009
@@ -1,5 +1,4 @@
 import py
-from py.__.test import event
 
 class StatRecorder:
     def __init__(self, rootdirlist):

Modified: py/trunk/py/test/plugin/pytest_default.py
==============================================================================
--- py/trunk/py/test/plugin/pytest_default.py	(original)
+++ py/trunk/py/test/plugin/pytest_default.py	Sat Apr  4 02:23:04 2009
@@ -13,6 +13,10 @@
         item.config.pytestplugins.notify("itemtestreport", report) 
         return True
 
+    def pytest_item_makereport(self, item, excinfo, when, outerr):
+        from py.__.test import event
+        return event.ItemTestReport(item, excinfo, when, outerr)
+
     def pytest_pyfunc_call(self, pyfuncitem, args, kwargs):
         pyfuncitem.obj(*args, **kwargs)
 
@@ -163,10 +167,6 @@
                 from py.__.test.dist.dsession import  DSession
                 config.setsessionclass(DSession)
 
-    def pytest_item_makereport(self, item, excinfo, when, outerr):
-        from py.__.test import event
-        return event.ItemTestReport(item, excinfo, when, outerr)
-
 def test_implied_different_sessions(tmpdir):
     def x(*args):
         config = py.test.config._reparse([tmpdir] + list(args))

Modified: py/trunk/py/test/session.py
==============================================================================
--- py/trunk/py/test/session.py	(original)
+++ py/trunk/py/test/session.py	Sat Apr  4 02:23:04 2009
@@ -6,7 +6,7 @@
 """
 
 import py
-from py.__.test import event, outcome
+from py.__.test import outcome
 
 # imports used for genitems()
 Item = py.test.collect.Item



More information about the pytest-commit mailing list