[svn r63553] * allow doc to be tested distributedly

* be more eager to cleanup execnet gateway after tests

--HG--
branch : trunk
This commit is contained in:
hpk 2009-04-02 21:47:01 +02:00
parent 60596f880c
commit 3ab894cadc
3 changed files with 10 additions and 0 deletions

View File

@ -1,2 +1,3 @@
#XXX make work: excludedirs = ['_build']
pytest_plugins = ['pytest_restdoc']
rsyncdirs = ['.']

View File

@ -1,4 +1,5 @@
pytest_plugins = 'pytest_doctest', 'pytest_pytester' # , 'pytest_restdoc'
rsyncdirs = ['../doc']
rsyncignore = ['c-extension/greenlet/build']
import py

View File

@ -33,6 +33,14 @@ class ExecnetcleanupPlugin:
l.append(gw)
#for gw in l:
# gw.join()
#
def pytest_pyfunc_call(self, __call__, pyfuncitem, args, kwargs):
if self._gateways is not None:
gateways = self._gateways[:]
res = __call__.execute(firstresult=True)
while len(self._gateways) > len(gateways):
self._gateways[-1].exit()
return res
def test_generic(plugintester):
plugintester.apicheck(ExecnetcleanupPlugin)