class Module(FSCollector, PyCollectorMixin):
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, fspath, parent=None):
*no docstring available*
arguments:
- self: <Instance of AnyOf(Class DocDirectory, Class Module, Class DocDirectory, Class ReSTChecker, Class MyDirectory, Class DocDirectory, Class Module, Class ReSTChecker, Class Directory, Class Directory, Class Directory, Class ReSTChecker)>
- fspath: <Instance of Class LocalPath>
- parent: AnyOf(<Instance of Class MyDirectory>, <Instance of Class Directory>, <Instance of Class DocDirectory>, <Instance of Class Directory>, <Instance of Class DocDirectory>, <None>, <Instance of Class DocDirectory>, <Instance of Class Directory>)
return value:
<None>
source: test/collect.py
|
def __init__(self, fspath, parent=None): |
fspath = py.path.local(fspath) |
super(FSCollector, self).__init__(fspath.basename, parent) |
self.fspath = fspath | |
def classnamefilter(self, name):
*no docstring available*
arguments:
return value:
<Boolean>
def finishcapture(self):
*no docstring available*
arguments:
return value:
<None>
def funcnamefilter(self, name):
*no docstring available*
arguments:
return value:
<Boolean>
def join(self, name):
*no docstring available*
source: test/collect.py
353 |
354 |
355 |
356 |
357 |
358 |
359 | |
def join(self, name): |
res = super(Module, self).join(name) |
if res is None: |
attr = getattr(self.obj, name, None) |
if attr is not None: |
res = self.makeitem(name, attr, usefilters=False) |
return res | |
def listchain(self):
return list of all parent collectors up to ourself.
arguments:
return value:
<List>
source: test/collect.py
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 | |
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:
<List>
def makeitem(self, name, obj, usefilters=True):
*no docstring available*
arguments:
- self: <Instance of Class Module>
- name: <String>
- obj: AnyOf(<Module>, Class Testmygroup, Class Passed, Class TestDisabled, Class TestClass, <BuiltinFunction>, <Instance of Class member_descriptor>, <Instance of Class method_descriptor>, Class TestGenMethods, Class TestBrokenClass, <List>, <Dict>, <Instance of Class wrapper_descriptor>, Class Failed, <Instance of Class LocalPath>, Class BrokenRepr2, Class TestFailing, <Function>, Class Skipped, <Instance of Class getset_descriptor>, <Instance of Class classmethod_descriptor>, <None>, Class TestStateFullThing, Class BrokenRepr1, <Instance of Class _Feature>, <String>, Class TestClass, Class TestX)
- usefilters: <Boolean>
return value:
AnyOf(<Instance of Class Function>, <Instance of Class Class>, <Instance of
Class Class>, <Instance of
Class Generator>, <None>, <Instance of
Class Function>)
source: test/collect.py
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 | |
def makeitem(self, name, obj, usefilters=True): |
if (not usefilters or self.classnamefilter(name)) and \ |
py.std.inspect.isclass(obj): |
return self.Class(name, parent=self) |
elif (not usefilters or self.funcnamefilter(name)) and callable(obj): |
if obj.func_code.co_flags & 32: |
return self.Generator(name, parent=self) |
else: |
return self.Function(name, parent=self) | |
def multijoin(self, namelist):
return a list of colitems for the given namelist.
arguments:
return value:
<List>
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):
*no docstring available*
arguments:
return value:
AnyOf(<None>, <List>)
source: test/collect.py
|
def run(self): |
if getattr(self.obj, 'disabled', 0): |
return [] |
return super(Module, self).run() | |
def setup(self):
*no docstring available*
arguments:
return value:
<None>
def startcapture(self):
*no docstring available*
arguments:
return value:
<None>
def teardown(self):
*no docstring available*
arguments:
return value:
<None>
source: test/collect.py
|
def teardown(self): |
if hasattr(self.obj, 'teardown_module'): |
self.obj.teardown_module(self.obj) | |
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:
<Int>
def __ne__(self, other):
*no docstring available*
arguments:
- self: <UNKNOWN>
- other: <UNKNOWN>
return value:
<UNKNOWN>
def __repr__(self):
*no docstring available*
arguments:
return value:
<String>