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