[svn r63598] cleanup of imports and shuffling of plugin method.

--HG--
branch : trunk
This commit is contained in:
hpk 2009-04-04 02:23:04 +02:00
parent 6bf57efa8f
commit 7b47da2203
6 changed files with 6 additions and 10 deletions

View File

@ -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 @@ class DSession(Session):
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

View File

@ -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

View File

@ -12,7 +12,6 @@ from __future__ import generators
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):

View File

@ -1,5 +1,4 @@
import py
from py.__.test import event
class StatRecorder:
def __init__(self, rootdirlist):

View File

@ -13,6 +13,10 @@ class DefaultPlugin:
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 @@ class DefaultPlugin:
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))

View File

@ -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