yield stop item instances from flattening the collector.
XXX deprecated: this way of iteration is not safe in all
cases. Mostly fixed, need to introduce skipped-by-keyword
def tryiter(self, yieldtype=None, reporterror=None, keyword=None):
origin: test.collect.Collector
where:
changes in __dict__ after execution:
function source:
def tryiter(self, yieldtype=None, reporterror=None, keyword=None):
""" yield stop item instances from flattening the collector.
XXX deprecated: this way of iteration is not safe in all
cases. Mostly fixed, need to introduce skipped-by-keyword
"""
if yieldtype is None:
yieldtype = py.test.Item
if isinstance(self, yieldtype):
try:
self.skipbykeyword(keyword)
yield self
except py.test.Item.Skipped:
if reporterror is not None:
excinfo = py.code.ExceptionInfo()
reporterror((excinfo, self))
else:
if not isinstance(self, py.test.Item):
try:
if reporterror is not None:
reporterror((None, self))
for x in self.run():
for y in self.join(x).tryiter(yieldtype, reporterror, keyword):
yield y
except KeyboardInterrupt:
raise
except:
if reporterror is not None:
excinfo = py.code.ExceptionInfo()
reporterror((excinfo, self))
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.0
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.1
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.2
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.3
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.4
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.5
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.6
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.7
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.8
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.9
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.10
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.11
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.12
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.13
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.14
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.15
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.16
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.17
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.18
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py
traceback test.collect.Instance.tryiter.19
called in /home/johnny/projects/merlinux/py/dist/py/test/collect.py