class Collector(object):
Collector instances are iteratively generated
(through their run() and join() methods)
and form a tree. attributes::
parent: attribute pointing to the parent collector
(or None if it is the root collector)
name: basename of this collector object
class attributes and properties:
Class: <property object (dynamically calculated value)>
Directory: <property object (dynamically calculated value)>
DoctestFile: <property object (dynamically calculated value)>
Function: <property object (dynamically calculated value)>
Generator: <property object (dynamically calculated value)>
Instance: <property object (dynamically calculated value)>
Module: <property object (dynamically calculated value)>
obj: <property object (dynamically calculated value)>
methods:
def __init__(self, name, parent=None):
*no docstring available*
arguments:
- self: <UNKNOWN>
- name: <UNKNOWN>
- parent: <UNKNOWN>
return value:
<UNKNOWN>
source: test/collect.py
|
def __init__(self, name, parent=None): |
self.name = name |
self.parent = parent |
self._config = getattr(parent, '_config', py.test.config) |
if parent is not None: |
if hasattr(parent, 'config'): |
py.test.pdb() |
self.fspath = getattr(parent, 'fspath', None) | |
def finishcapture(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def join(self, name):
return a child item for the given name. Usually the
session feeds the join method with each name obtained
from ``colitem.run()``. If the return value is None
it means the ``colitem`` was not able to resolve
with the given name.
arguments:
- self: <UNKNOWN>
- name: <UNKNOWN>
return value:
<UNKNOWN>
source: test/collect.py
|
def join(self, name): |
""" return a child item for the given name. Usually the |
session feeds the join method with each name obtained |
from ``colitem.run()``. If the return value is None |
it means the ``colitem`` was not able to resolve |
with the given name. |
""" | |
def listchain(self):
return list of all parent collectors up to ourself.
arguments:
return value:
<UNKNOWN>
source: test/collect.py
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | |
def listchain(self): |
""" return list of all parent collectors up to ourself. """ |
l = [self] |
while 1: |
x = l[-1] |
if x.parent is not None: |
l.append(x.parent) |
else: |
l.reverse() |
return l | |
def listnames(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def multijoin(self, namelist):
return a list of colitems for the given namelist.
arguments:
- self: <UNKNOWN>
- namelist: <UNKNOWN>
return value:
<UNKNOWN>
source: test/collect.py
|
def multijoin(self, namelist): |
""" return a list of colitems for the given namelist. """ |
return [self.join(name) for name in namelist] | |
def run(self):
returns a list of names available from this collector.
You can return an empty list. Callers of this method
must take care to catch exceptions properly. The session
object guards its calls to ``colitem.run()`` in its
``session.runtraced(colitem)`` method, including
catching of stdout.
arguments:
return value:
<UNKNOWN>
source: test/collect.py
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | |
def run(self): |
""" returns a list of names available from this collector. |
You can return an empty list. Callers of this method |
must take care to catch exceptions properly. The session |
object guards its calls to ``colitem.run()`` in its |
``session.runtraced(colitem)`` method, including |
catching of stdout. |
""" |
raise NotImplementedError("abstract") | |
def setup(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def startcapture(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def teardown(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def __cmp__(self, other):
*no docstring available*
arguments:
- self: <UNKNOWN>
- other: <UNKNOWN>
return value:
<UNKNOWN>
source: test/collect.py
|
def __cmp__(self, other): |
s1 = self._getsortvalue() |
s2 = other._getsortvalue() |
|
return cmp(s1, s2) | |
def __eq__(self, other):
*no docstring available*
arguments:
- self: <UNKNOWN>
- other: <UNKNOWN>
return value:
<UNKNOWN>
def __hash__(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def __ne__(self, other):
*no docstring available*
arguments:
- self: <UNKNOWN>
- other: <UNKNOWN>
return value:
<UNKNOWN>
def __repr__(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>