[svn r37427] Kill the last occurencies of pkgdir
--HG-- branch : trunk
This commit is contained in:
parent
9539e49743
commit
6c428bafbf
|
@ -227,12 +227,11 @@ class LSession(AbstractSession):
|
||||||
reporter, checkfun = self.wrap_reporter(reporter)
|
reporter, checkfun = self.wrap_reporter(reporter)
|
||||||
|
|
||||||
reporter(report.TestStarted(sshhosts))
|
reporter(report.TestStarted(sshhosts))
|
||||||
pkgdir = self.getpkgdir(args[0])
|
|
||||||
colitems = self.config.getcolitems()
|
colitems = self.config.getcolitems()
|
||||||
reporter(report.RsyncFinished())
|
reporter(report.RsyncFinished())
|
||||||
|
|
||||||
if runner is None:
|
if runner is None:
|
||||||
runner = self.init_runner(pkgdir)
|
runner = self.init_runner()
|
||||||
|
|
||||||
keyword = self.config.option.keyword
|
keyword = self.config.option.keyword
|
||||||
|
|
||||||
|
@ -245,10 +244,10 @@ class LSession(AbstractSession):
|
||||||
if not self.config.option.nomagic:
|
if not self.config.option.nomagic:
|
||||||
py.magic.revoke(assertion=1)
|
py.magic.revoke(assertion=1)
|
||||||
|
|
||||||
self.write_docs(pkgdir)
|
self.write_docs()
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
def write_docs(self, pkgdir):
|
def write_docs(self):
|
||||||
if self.config.option.apigen:
|
if self.config.option.apigen:
|
||||||
from py.__.apigen.tracer.docstorage import DocStorageAccessor
|
from py.__.apigen.tracer.docstorage import DocStorageAccessor
|
||||||
apigen = py.path.local(self.config.option.apigen).pyimport()
|
apigen = py.path.local(self.config.option.apigen).pyimport()
|
||||||
|
@ -259,7 +258,8 @@ class LSession(AbstractSession):
|
||||||
capture = py.io.OutErrCapture()
|
capture = py.io.OutErrCapture()
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
apigen.build(pkgdir, DocStorageAccessor(self.docstorage))
|
apigen.build(self.config.topdir,
|
||||||
|
DocStorageAccessor(self.docstorage))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
import traceback
|
import traceback
|
||||||
exc, e, tb = sys.exc_info()
|
exc, e, tb = sys.exc_info()
|
||||||
|
@ -272,13 +272,13 @@ class LSession(AbstractSession):
|
||||||
finally:
|
finally:
|
||||||
capture.reset()
|
capture.reset()
|
||||||
|
|
||||||
def init_runner(self, pkgdir):
|
def init_runner(self):
|
||||||
if self.config.option.apigen:
|
if self.config.option.apigen:
|
||||||
from py.__.apigen.tracer.tracer import Tracer, DocStorage
|
from py.__.apigen.tracer.tracer import Tracer, DocStorage
|
||||||
module = py
|
module = py
|
||||||
try:
|
try:
|
||||||
apigen = py.path.local(self.config.option.apigen).pyimport()
|
apigen = py.path.local(self.config.option.apigen).pyimport()
|
||||||
items = apigen.get_documentable_items(pkgdir)
|
items = apigen.get_documentable_items(self.config.topdir)
|
||||||
if isinstance(items, dict):
|
if isinstance(items, dict):
|
||||||
self.docstorage = DocStorage().from_dict(items)
|
self.docstorage = DocStorage().from_dict(items)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -286,7 +286,7 @@ class TestLSession(object):
|
||||||
all = str(tmpdir)
|
all = str(tmpdir)
|
||||||
config = py.test.config._reparse(all.split(" "))
|
config = py.test.config._reparse(all.split(" "))
|
||||||
lsession = LSession(config)
|
lsession = LSession(config)
|
||||||
assert lsession.init_runner(pkgdir) is opt_mapping[opt]
|
assert lsession.init_runner() is opt_mapping[opt]
|
||||||
#tmpdir.dirpath().ensure("conftest.py").write(py.code.Source("""
|
#tmpdir.dirpath().ensure("conftest.py").write(py.code.Source("""
|
||||||
#dist_boxing=True
|
#dist_boxing=True
|
||||||
#"""))
|
#"""))
|
||||||
|
|
Loading…
Reference in New Issue