[py-svn] r36970 - in py/branch/config/py/test/rsession: . testing
hpk at codespeak.net
hpk at codespeak.net
Thu Jan 18 20:33:18 CET 2007
Author: hpk
Date: Thu Jan 18 20:33:16 2007
New Revision: 36970
Modified:
py/branch/config/py/test/rsession/slave.py
py/branch/config/py/test/rsession/testing/test_rsession.py
py/branch/config/py/test/rsession/testing/test_slave.py
Log:
some little cleanups - getting rid of we_are_remote
which is not used anywhere as far as i can see.
maciej: please check that i didn't mess anything
up, but for me the same tests as before pass
Modified: py/branch/config/py/test/rsession/slave.py
==============================================================================
--- py/branch/config/py/test/rsession/slave.py (original)
+++ py/branch/config/py/test/rsession/slave.py Thu Jan 18 20:33:16 2007
@@ -86,9 +86,8 @@
return callback
import os, sys
- from Queue import Queue
pkgdir = channel.receive() # path is ready
- config_repr = channel.receive() # options stuff, should be dictionary
+ config_repr = channel.receive()
basedir = os.path.dirname(pkgdir)
pkgname = os.path.basename(pkgdir)
# setup defaults...
@@ -101,17 +100,14 @@
config.conftest.setinitial([basedir])
#config.conftest.lget('adddefaultoptions')()
config.merge_repr(config_repr)
- config._overwrite('we_are_remote', True)
from py.__.test.rsession.slave import Info
Info.pid = 0
- # XXX the following assumes that py lib is there, a bit
- # much of an assumtion
if not config.option.nomagic:
py.magic.invoke(assertion=1)
mod = __import__(pkgname)
assert py.path.local(mod.__file__).dirpath() == py.path.local(pkgdir)
from py.__.test.rsession.slave import slave_main
- queue = Queue()
+ queue = py.std.Queue.Queue()
channel.setcallback(callback_gen(queue))
slave_main(queue.get, channel.send, basedir, config)
if not config.option.nomagic:
Modified: py/branch/config/py/test/rsession/testing/test_rsession.py
==============================================================================
--- py/branch/config/py/test/rsession/testing/test_rsession.py (original)
+++ py/branch/config/py/test/rsession/testing/test_rsession.py Thu Jan 18 20:33:16 2007
@@ -10,7 +10,7 @@
HostInfo
from py.__.test.rsession.testing.test_slave import funcfail_spec,\
funcpass_spec, funcskip_spec, funcprint_spec, funcprintfail_spec, \
- funcoptioncustom_spec, funcoption_spec
+ funcoptioncustom_spec
def setup_module(mod):
mod.pkgdir = py.path.local(py.__file__).dirpath()
@@ -234,12 +234,10 @@
optimise_localhost=False)
rootcol = py.test.collect.Directory(pkgdir.dirpath())
- itempass = rootcol.getitembynames(funcoption_spec)
- itempassaswell = rootcol.getitembynames(funcoptioncustom_spec)
+ itempass = rootcol.getitembynames(funcoptioncustom_spec)
for node in nodes:
node.send(itempass)
- node.send(itempassaswell)
teardown_hosts(allevents.append, [node.channel for node in nodes], nodes)
events = [i for i in allevents
@@ -248,7 +246,7 @@
if i.outcome.passed]
skipped = [i for i in events
if i.outcome.skipped]
- assert len(passed) == 2 * len(nodes)
+ assert len(passed) == 1 * len(nodes)
assert len(skipped) == 0
assert len(events) == len(passed)
finally:
Modified: py/branch/config/py/test/rsession/testing/test_slave.py
==============================================================================
--- py/branch/config/py/test/rsession/testing/test_slave.py (original)
+++ py/branch/config/py/test/rsession/testing/test_slave.py Thu Jan 18 20:33:16 2007
@@ -31,9 +31,6 @@
print "samfing elz"
asddsa
-def funcoption():
- assert py.test.config.getvalue('we_are_remote')
-
def funcoptioncustom():
assert py.test.config.getvalue("custom")
@@ -47,7 +44,6 @@
funcskip_spec = (BASE + "funcskip").split("/")
funcprint_spec = (BASE + "funcprint").split("/")
funcprintfail_spec = (BASE + "funcprintfail").split("/")
-funcoption_spec = (BASE + "funcoption").split("/")
funcoptioncustom_spec = (BASE + "funcoptioncustom").split("/")
funchang_spec = (BASE + "funchang").split("/")
mod_spec = BASE[:-1].split("/")
More information about the pytest-commit
mailing list