[svn r57744] Merging collection-API refactoring branch:

* collectors now have a collect() method
* items have a runtest() method
* deprecated old run/join of collectors and
  run/execute methods of items

--HG--
branch : trunk
This commit is contained in:
hpk
2008-09-02 10:58:14 +02:00
parent ee94d1d2bd
commit 494ea31042
20 changed files with 631 additions and 535 deletions
+2 -2
View File
@@ -192,7 +192,7 @@ class InlineCollection(FileCreation):
def getmodulecol(self, source, configargs=(), withsession=False):
self.tmpdir.ensure("__init__.py")
kw = {self.tmpdir.basename: py.code.Source(source).strip()}
kw = {"test_" + self.tmpdir.basename: py.code.Source(source).strip()}
path = self.makepyfile(**kw)
self.config = self.parseconfig(path, *configargs)
if withsession:
@@ -204,7 +204,7 @@ class InlineCollection(FileCreation):
def getitems(self, source):
modulecol = self.getmodulecol(source)
return [modulecol.join(x) for x in modulecol.listdir()]
return modulecol.collect()
def getitem(self, source, funcname="test_func"):
modulecol = self.getmodulecol(source)