Esempio n. 1
0
def pytest_pycollect_makeitem(collector, name, obj):
    if inspect.isclass(obj) and plugin_base.want_class(obj):
        return pytest.Class(name, parent=collector)
    elif (inspect.isfunction(obj) and isinstance(collector, pytest.Instance)
          and plugin_base.want_method(collector.cls, obj)):
        return pytest.Function(name, parent=collector)
    else:
        return []
Esempio n. 2
0
def pytest_pycollect_makeitem(collector, name, obj):
    if inspect.isclass(obj) and plugin_base.want_class(obj):
        return pytest.Class(name, parent=collector)
    elif inspect.isfunction(obj) and \
            isinstance(collector, pytest.Instance) and \
            plugin_base.want_method(collector.cls, obj):
        return pytest.Function(name, parent=collector)
    else:
        return []
Esempio n. 3
0
 def wantClass(self, cls):
     return plugin_base.want_class(cls)
Esempio n. 4
0
 def wantClass(self, cls):
     return plugin_base.want_class(cls)