fix funcarg usage in execnet, regen setup

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-04-14 23:01:46 +02:00
parent ae6ba1c0a8
commit 6b1b3a3494
3 changed files with 17 additions and 11 deletions

View File

@ -4,7 +4,6 @@ LICENSE
MANIFEST
README.txt
TODO.txt
ez_setup.py
py/LICENSE
py/__init__.py
py/_com.py
@ -297,6 +296,7 @@ py/test/testing/test_compat.py
py/test/testing/test_config.py
py/test/testing/test_conftesthandle.py
py/test/testing/test_deprecated_api.py
py/test/testing/test_funcargs.py
py/test/testing/test_genitems.py
py/test/testing/test_outcome.py
py/test/testing/test_parseopt.py

View File

@ -33,7 +33,8 @@ class TestGatewayManagerPopen:
hm.exit()
assert not len(hm.gateways)
def test_popens_rsync(self, source):
def test_popens_rsync(self, mysetup):
source = mysetup.source
hm = GatewayManager(["popen"] * 2)
hm.makegateways()
assert len(hm.gateways) == 2
@ -45,7 +46,8 @@ class TestGatewayManagerPopen:
hm.exit()
assert not len(hm.gateways)
def test_rsync_popen_with_path(self, source, dest):
def test_rsync_popen_with_path(self, mysetup):
source, dest = mysetup.source, mysetup.dest
hm = GatewayManager(["popen//chdir=%s" %dest] * 1)
hm.makegateways()
source.ensure("dir1", "dir2", "hello")
@ -59,7 +61,8 @@ class TestGatewayManagerPopen:
assert dest.join("dir1", "dir2").check()
assert dest.join("dir1", "dir2", 'hello').check()
def test_hostmanage_rsync_same_popen_twice(self, source, dest, _pytest):
def test_hostmanage_rsync_same_popen_twice(self, mysetup, _pytest):
source, dest = mysetup.source, mysetup.dest
rec = _pytest.getcallrecorder(py.execnet._API)
hm = GatewayManager(["popen//chdir=%s" %dest] * 2)
hm.makegateways()
@ -109,13 +112,15 @@ class TestGatewayManagerPopen:
assert l[0].startswith(curwd)
assert l[0].endswith("hello")
def pytest_funcarg__source(pyfuncitem):
return py.test.ensuretemp(pyfuncitem.getmodpath()).mkdir("source")
def pytest_funcarg__dest(pyfuncitem):
return py.test.ensuretemp(pyfuncitem.getmodpath()).mkdir("dest")
class pytest_funcarg__mysetup:
def __init__(self, request):
tmp = request.maketempdir()
self.source = tmp.mkdir("source")
self.dest = tmp.mkdir("dest")
class TestHRSync:
def test_hrsync_filter(self, source, dest):
def test_hrsync_filter(self, mysetup):
source, dest = mysetup.source, mysetup.dest
source.ensure("dir", "file.txt")
source.ensure(".svn", "entries")
source.ensure(".somedotfile", "moreentries")
@ -129,7 +134,8 @@ class TestHRSync:
assert 'file.txt' in basenames
assert 'somedir' in basenames
def test_hrsync_one_host(self, source, dest):
def test_hrsync_one_host(self, mysetup):
source, dest = mysetup.source, mysetup.dest
gw = py.execnet.makegateway("popen//chdir=%s" % dest)
finished = []
rsync = HostRSync(source)

View File

@ -1,7 +1,7 @@
"""
setup file for 'py' package based on:
https://codespeak.net/svn/py/trunk, revision=63999
https://codespeak.net/svn/py/trunk, revision=64076
autogenerated by gensetup.py
"""