[py-svn] r63157 - in py/trunk/py/test: . dsession dsession/testing plugin testing
hpk at codespeak.net
hpk at codespeak.net
Fri Mar 20 21:38:52 CET 2009
Author: hpk
Date: Fri Mar 20 21:38:50 2009
New Revision: 63157
Modified:
py/trunk/py/test/dsession/nodemanage.py
py/trunk/py/test/dsession/testing/test_functional_dsession.py
py/trunk/py/test/event.py
py/trunk/py/test/plugin/pytest_terminal.py
py/trunk/py/test/testing/test_config.py
Log:
remove old events, some more renamings
Modified: py/trunk/py/test/dsession/nodemanage.py
==============================================================================
--- py/trunk/py/test/dsession/nodemanage.py (original)
+++ py/trunk/py/test/dsession/nodemanage.py Fri Mar 20 21:38:50 2009
@@ -4,41 +4,6 @@
from py.__.execnet.gwmanage import GatewayManager
from py.__.test import event
-def getxspecs(config):
- if config.option.numprocesses:
- if config.option.executable:
- s = 'popen//python=%s' % config.option.executable
- else:
- s = 'popen'
- xspecs = [s] * config.option.numprocesses
- else:
- xspecs = config.option.xspecs
- if not xspecs:
- xspecs = config.getvalue("xspecs")
- assert xspecs is not None
- #print "option value for xspecs", xspecs
- return [py.execnet.XSpec(x) for x in xspecs]
-
-def getconfigroots(config):
- roots = config.option.rsyncdirs
- if roots:
- roots = [py.path.local(x) for x in roots.split(',')]
- else:
- roots = []
- conftestroots = config.getconftest_pathlist("rsyncdirs")
- if conftestroots:
- roots.extend(conftestroots)
- pydir = py.path.local(py.__file__).dirpath()
- for root in roots:
- if not root.check():
- raise ValueError("rsyncdir doesn't exist: %r" %(root,))
- if pydir is not None and root.basename == "py":
- if root != pydir:
- raise ValueError("root %r conflicts with current %r" %(root, pydir))
- pydir = None
- if pydir is not None:
- roots.append(pydir)
- return roots
class NodeManager(object):
def __init__(self, config, specs=None):
@@ -94,7 +59,7 @@
self.gwmanager.rsync(self.config.topdir, **options)
# and cd into it
self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False)
- self.config.bus.notify("rsyncfinished", event.RsyncFinished())
+ self.config.bus.notify("rsyncfinished")
def trace(self, msg):
self.config.bus.notify("trace", "nodemanage", msg)
@@ -123,3 +88,39 @@
def teardown_nodes(self):
# XXX teardown nodes?
self.gwmanager.exit()
+
+def getxspecs(config):
+ if config.option.numprocesses:
+ if config.option.executable:
+ s = 'popen//python=%s' % config.option.executable
+ else:
+ s = 'popen'
+ xspecs = [s] * config.option.numprocesses
+ else:
+ xspecs = config.option.xspecs
+ if not xspecs:
+ xspecs = config.getvalue("xspecs")
+ assert xspecs is not None
+ #print "option value for xspecs", xspecs
+ return [py.execnet.XSpec(x) for x in xspecs]
+
+def getconfigroots(config):
+ roots = config.option.rsyncdirs
+ if roots:
+ roots = [py.path.local(x) for x in roots.split(',')]
+ else:
+ roots = []
+ conftestroots = config.getconftest_pathlist("rsyncdirs")
+ if conftestroots:
+ roots.extend(conftestroots)
+ pydir = py.path.local(py.__file__).dirpath()
+ for root in roots:
+ if not root.check():
+ raise ValueError("rsyncdir doesn't exist: %r" %(root,))
+ if pydir is not None and root.basename == "py":
+ if root != pydir:
+ raise ValueError("root %r conflicts with current %r" %(root, pydir))
+ pydir = None
+ if pydir is not None:
+ roots.append(pydir)
+ return roots
Modified: py/trunk/py/test/dsession/testing/test_functional_dsession.py
==============================================================================
--- py/trunk/py/test/dsession/testing/test_functional_dsession.py (original)
+++ py/trunk/py/test/dsession/testing/test_functional_dsession.py Fri Mar 20 21:38:50 2009
@@ -89,6 +89,6 @@
assert os.nice(0) == 10
""")
evrec = testdir.inline_run('-d', p1, '--tx=popen')
- ev = evrec.getreport('test_nice')
+ ev = evrec.getfirstnamed('itemtestreport')
assert ev.passed
Modified: py/trunk/py/test/event.py
==============================================================================
--- py/trunk/py/test/event.py (original)
+++ py/trunk/py/test/event.py Fri Mar 20 21:38:50 2009
@@ -157,16 +157,11 @@
self.remotepath = remotepath
self.synced = synced
-class RsyncFinished(BaseEvent):
- def __init__(self):
- self.time = timestamp()
-
class HostRSyncRootReady(BaseEvent):
def __init__(self, host, root):
self.host = host
self.root = root
-
# make all eventclasses available on BaseEvent so that
# consumers of events can easily filter by
# 'isinstance(event, event.Name)' checks
Modified: py/trunk/py/test/plugin/pytest_terminal.py
==============================================================================
--- py/trunk/py/test/plugin/pytest_terminal.py (original)
+++ py/trunk/py/test/plugin/pytest_terminal.py Fri Mar 20 21:38:50 2009
@@ -258,11 +258,6 @@
else:
excrepr.reprcrash.toterminal(self._tw)
- def out_hostinfo(self):
- self._tw.line("host 0: %s %s - Python %s" %
- (py.std.sys.platform,
- py.std.sys.executable,
- repr_pythonversion()))
class CollectonlyReporter:
INDENT = " "
Modified: py/trunk/py/test/testing/test_config.py
==============================================================================
--- py/trunk/py/test/testing/test_config.py (original)
+++ py/trunk/py/test/testing/test_config.py Fri Mar 20 21:38:50 2009
@@ -240,7 +240,6 @@
class TestOptionEffects:
def test_boxed_option_default(self, testdir):
- testdir.makepyfile(conftest="dist_hosts=[]")
tmpdir = testdir.tmpdir.ensure("subdir", dir=1)
config = py.test.config._reparse([tmpdir])
config.initsession()
@@ -254,10 +253,8 @@
assert not config.option.boxed
def test_boxed_option_from_conftest(self, testdir):
- testdir.makepyfile(conftest="dist_hosts=[]")
tmpdir = testdir.tmpdir.ensure("subdir", dir=1)
tmpdir.join("conftest.py").write(py.code.Source("""
- dist_hosts = []
dist_boxed = True
"""))
config = py.test.config._reparse(['--dist', tmpdir])
More information about the pytest-commit
mailing list