def pytest_pycollect_makeitem(collector, name, obj): config = collector.config if config.getoption('runappdirect') or config.getoption('direct_apptest'): return from pypy.tool.pytest.apptest import AppClassCollector from pypy.module._hpy_universal.test._vendored.support import HPyTest if (collector.istestclass(obj, name) and issubclass(obj, HPyTest) and not name.startswith('App')): appname = make_hpy_apptest(collector, name, obj) return AppClassCollector(appname, parent=collector)
def makeitem(self, name, obj): if isclass(obj) and self.classnamefilter(name): if name.startswith('AppTest'): from pypy.tool.pytest.apptest import AppClassCollector return AppClassCollector(name, parent=self) elif hasattr(obj, 'func_code') and self.funcnamefilter(name): if name.startswith('app_test_'): assert not obj.func_code.co_flags & 32, \ "generator app level functions? you must be joking" from pypy.tool.pytest.apptest import AppTestFunction return AppTestFunction(name, parent=self) return super(PyPyModule, self).makeitem(name, obj)
def makeitem(self, name, obj): if isclass(obj) and self.classnamefilter(name): if name.startswith('AppTest'): from pypy.tool.pytest.apptest import AppClassCollector return AppClassCollector(name, parent=self) return super(PyPyModule, self).makeitem(name, obj)