[svn r63598] cleanup of imports and shuffling of plugin method.
--HG-- branch : trunk
This commit is contained in:
parent
6bf57efa8f
commit
7b47da2203
|
@ -5,7 +5,6 @@
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import py
|
import py
|
||||||
from py.__.test import event
|
|
||||||
from py.__.test.runner import basic_run_report, basic_collect_report
|
from py.__.test.runner import basic_run_report, basic_collect_report
|
||||||
from py.__.test.session import Session
|
from py.__.test.session import Session
|
||||||
from py.__.test import outcome
|
from py.__.test import outcome
|
||||||
|
@ -237,6 +236,7 @@ class DSession(Session):
|
||||||
self.node2pending[node].remove(item)
|
self.node2pending[node].remove(item)
|
||||||
|
|
||||||
def handle_crashitem(self, item, node):
|
def handle_crashitem(self, item, node):
|
||||||
|
from py.__.test import event
|
||||||
longrepr = "!!! Node %r crashed during running of test %r" %(node, item)
|
longrepr = "!!! Node %r crashed during running of test %r" %(node, item)
|
||||||
rep = event.ItemTestReport(item, when="???", excinfo=longrepr)
|
rep = event.ItemTestReport(item, when="???", excinfo=longrepr)
|
||||||
rep.node = node
|
rep.node = node
|
||||||
|
|
|
@ -2,10 +2,8 @@
|
||||||
Manage setup, running and local representation of remote nodes/processes.
|
Manage setup, running and local representation of remote nodes/processes.
|
||||||
"""
|
"""
|
||||||
import py
|
import py
|
||||||
from py.__.test import event
|
|
||||||
from py.__.test.dist.mypickle import PickleChannel
|
from py.__.test.dist.mypickle import PickleChannel
|
||||||
|
|
||||||
|
|
||||||
class TXNode(object):
|
class TXNode(object):
|
||||||
""" Represents a Test Execution environment in the controlling process.
|
""" Represents a Test Execution environment in the controlling process.
|
||||||
- sets up a slave node through an execnet gateway
|
- sets up a slave node through an execnet gateway
|
||||||
|
|
|
@ -12,7 +12,6 @@ from __future__ import generators
|
||||||
import py
|
import py
|
||||||
from py.__.test.session import Session
|
from py.__.test.session import Session
|
||||||
from py.__.test.dist.mypickle import PickleChannel
|
from py.__.test.dist.mypickle import PickleChannel
|
||||||
from py.__.test import event
|
|
||||||
from py.__.test.looponfail import util
|
from py.__.test.looponfail import util
|
||||||
|
|
||||||
class LooponfailingSession(Session):
|
class LooponfailingSession(Session):
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import py
|
import py
|
||||||
from py.__.test import event
|
|
||||||
|
|
||||||
class StatRecorder:
|
class StatRecorder:
|
||||||
def __init__(self, rootdirlist):
|
def __init__(self, rootdirlist):
|
||||||
|
|
|
@ -13,6 +13,10 @@ class DefaultPlugin:
|
||||||
item.config.pytestplugins.notify("itemtestreport", report)
|
item.config.pytestplugins.notify("itemtestreport", report)
|
||||||
return True
|
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):
|
def pytest_pyfunc_call(self, pyfuncitem, args, kwargs):
|
||||||
pyfuncitem.obj(*args, **kwargs)
|
pyfuncitem.obj(*args, **kwargs)
|
||||||
|
|
||||||
|
@ -163,10 +167,6 @@ class DefaultPlugin:
|
||||||
from py.__.test.dist.dsession import DSession
|
from py.__.test.dist.dsession import DSession
|
||||||
config.setsessionclass(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 test_implied_different_sessions(tmpdir):
|
||||||
def x(*args):
|
def x(*args):
|
||||||
config = py.test.config._reparse([tmpdir] + list(args))
|
config = py.test.config._reparse([tmpdir] + list(args))
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import py
|
import py
|
||||||
from py.__.test import event, outcome
|
from py.__.test import outcome
|
||||||
|
|
||||||
# imports used for genitems()
|
# imports used for genitems()
|
||||||
Item = py.test.collect.Item
|
Item = py.test.collect.Item
|
||||||
|
|
Loading…
Reference in New Issue