parent
50c6e97e1c
commit
ce498a1504
|
@ -44,3 +44,6 @@ class BasicRsessionTest(object):
|
|||
col = self.collector_test_one.join(funcname)
|
||||
assert col is not None, funcname
|
||||
return col
|
||||
|
||||
def getmod(self):
|
||||
return self.collector_test_one
|
||||
|
|
|
@ -5,7 +5,7 @@ import example1
|
|||
from py.__.test.rsession.executor import RunExecutor, BoxExecutor,\
|
||||
AsyncExecutor, ApigenExecutor
|
||||
from py.__.test.rsession.outcome import ReprOutcome
|
||||
from py.__.test.rsession.testing.runtest import BasicRsessionTest
|
||||
from py.__.test.rsession.testing.basetest import BasicRsessionTest
|
||||
|
||||
#def setup_module(mod):
|
||||
# mod.rootdir = py.path.local(py.__file__).dirpath().dirpath()
|
||||
|
@ -58,7 +58,7 @@ class TestExecutor(BasicRsessionTest):
|
|||
assert not outcome.excinfo
|
||||
|
||||
def test_box_executor_stdout(self):
|
||||
item = self.rootcol._getitembynames(self.funcprint_spec)
|
||||
item = self.getexample("print")
|
||||
ex = BoxExecutor(item, config=self.config)
|
||||
outcome_repr = ex.execute()
|
||||
outcome = ReprOutcome(outcome_repr)
|
||||
|
@ -66,7 +66,7 @@ class TestExecutor(BasicRsessionTest):
|
|||
assert outcome.stdout.find("samfing") != -1
|
||||
|
||||
def test_box_executor_stdout_error(self):
|
||||
item = self.rootcol._getitembynames(self.funcprintfail_spec)
|
||||
item = self.getexample("printfail")
|
||||
ex = BoxExecutor(item, config=self.config)
|
||||
outcome_repr = ex.execute()
|
||||
outcome = ReprOutcome(outcome_repr)
|
||||
|
@ -74,7 +74,7 @@ class TestExecutor(BasicRsessionTest):
|
|||
assert outcome.stdout.find("samfing elz") != -1
|
||||
|
||||
def test_cont_executor(self):
|
||||
item = self.rootcol._getitembynames(self.funcprintfail_spec)
|
||||
item = self.getexample("printfail")
|
||||
ex = AsyncExecutor(item, config=self.config)
|
||||
cont, pid = ex.execute()
|
||||
assert pid
|
||||
|
|
|
@ -25,7 +25,7 @@ from py.__.test.rsession import repevent
|
|||
from py.__.test.rsession.outcome import ReprOutcome, Outcome
|
||||
from py.__.test.rsession.hostmanage import HostInfo
|
||||
from py.__.test.rsession.box import Box
|
||||
from py.__.test.rsession.testing.runtest import BasicRsessionTest
|
||||
from py.__.test.rsession.testing.basetest import BasicRsessionTest
|
||||
import sys
|
||||
from StringIO import StringIO
|
||||
|
||||
|
@ -57,7 +57,7 @@ class AbstractTestReporter(BasicRsessionTest):
|
|||
return outcomes
|
||||
|
||||
def report_received_item_outcome(self):
|
||||
item = self.rootcol._getitembynames(self.funcpass_spec)
|
||||
item = self.getexample("pass")
|
||||
outcomes = self.prepare_outcomes()
|
||||
|
||||
def boxfun(config, item, outcomes):
|
||||
|
@ -74,8 +74,8 @@ class AbstractTestReporter(BasicRsessionTest):
|
|||
return out
|
||||
|
||||
def _test_module(self):
|
||||
funcitem = self.rootcol._getitembynames(self.funcpass_spec)
|
||||
moditem = self.rootcol._getitembynames(self.mod_spec)
|
||||
funcitem = self.getexample("pass")
|
||||
moditem = self.getmod()
|
||||
outcomes = self.prepare_outcomes()
|
||||
|
||||
def boxfun(config, item, funcitem, outcomes):
|
||||
|
|
|
@ -6,7 +6,7 @@ import py
|
|||
from py.__.test.rsession import repevent
|
||||
from py.__.test.rsession.rsession import RSession
|
||||
from py.__.test.rsession.hostmanage import HostManager, HostInfo
|
||||
from py.__.test.rsession.testing.runtest import BasicRsessionTest
|
||||
from py.__.test.rsession.testing.basetest import BasicRsessionTest
|
||||
from py.__.test.rsession.testing.test_hostmanage import DirSetup
|
||||
|
||||
def setup_module(mod):
|
||||
|
@ -148,10 +148,10 @@ class TestRSessionRemote(DirSetup, BasicRsessionTest):
|
|||
from py.__.test.rsession.testing.test_executor \
|
||||
import ItemTestPassing, ItemTestFailing, ItemTestSkipping
|
||||
|
||||
itempass = self.rootcol._getitembynames(self.funcpass_spec)
|
||||
itemfail = self.rootcol._getitembynames(self.funcfail_spec)
|
||||
itemskip = self.rootcol._getitembynames(self.funcskip_spec)
|
||||
itemprint = self.rootcol._getitembynames(self.funcprint_spec)
|
||||
itempass = self.getexample("pass")
|
||||
itemfail = self.getexample("fail")
|
||||
itemskip = self.getexample("skip")
|
||||
itemprint = self.getexample("print")
|
||||
|
||||
# actually run some tests
|
||||
for node in nodes:
|
||||
|
|
Loading…
Reference in New Issue