def pytest_runtest_protocol(self, item, nextitem): try: # for common items description = item.function.__doc__ except AttributeError: # for doctests that has no `function` attribute description = item.reportinfo()[2] self.test = TestCase( name='.'.join( mangle_testnames( [x.name for x in parent_down_from_module(item)])), description=description, start=now(), attachments=[], labels=labels_of(item), status=None, steps=[], id=str(uuid.uuid4()) ) # for later resolution in AllureAgregatingListener.pytest_sessionfinish self.stack = [self.test] yield self.test = None self.stack = []
def pytest_runtest_protocol(self, item, nextitem): if not self.testsuite: module = parent_module(item) self.impl.start_suite(name=module.module.__name__, description=module.module.__doc__ or None) self.testsuite = 'Yes' name = '.'.join(mangle_testnames([x.name for x in parent_down_from_module(item)])) self.impl.start_case(name, description=item.function.__doc__, labels=labels_of(item)) yield if not nextitem or parent_module(item) != parent_module(nextitem): self.impl.stop_suite() self.testsuite = None
def pytest_runtest_protocol(self, __multicall__, item, nextitem): if not self.testsuite: module = parent_module(item) self.impl.start_suite(name='.'.join(mangle_testnames(module.nodeid.split("::"))), description=module.module.__doc__ or None) self.testsuite = 'Yes' name = '.'.join(mangle_testnames([x.name for x in parent_down_from_module(item)])) self.impl.start_case(name, description=item.function.__doc__, labels=labels_of(item)) result = __multicall__.execute() if not nextitem or parent_module(item) != parent_module(nextitem): self.impl.stop_suite() self.testsuite = None return result
def pytest_runtest_protocol(self, item, nextitem): self.test = TestCase(name='.'.join(mangle_testnames([x.name for x in parent_down_from_module(item)])), description=item.function.__doc__, start=now(), attachments=[], labels=labels_of(item), status=None, steps=[], id=str(uuid.uuid4())) # for later resolution in AllureAgregatingListener.pytest_sessionfinish self.stack = [self.test] yield self.test = None self.stack = []
def pytest_runtest_protocol(self, item, nextitem): if not self.testsuite: module = parent_module(item) self.impl.start_suite(name=module.module.__name__, description=module.module.__doc__ or None) self.testsuite = 'Yes' name = '.'.join( mangle_testnames([x.name for x in parent_down_from_module(item)])) self.impl.start_case(name, description=item.function.__doc__, labels=labels_of(item)) yield if not nextitem or parent_module(item) != parent_module(nextitem): self.impl.stop_suite() self.testsuite = None
def pytest_runtest_protocol(self, __multicall__, item, nextitem): if not self.testsuite: module = parent_module(item) self.impl.start_suite(name='.'.join(mangle_testnames(module.nodeid.split("::"))), description=module.module.__doc__ or None) self.testsuite = 'Yes' name = '.'.join(mangle_testnames([x.name for x in parent_down_from_module(item)])) self.impl.start_case(name, description=item.function.__doc__, severity=severity_of(item)) result = __multicall__.execute() if not nextitem or parent_module(item) != parent_module(nextitem): self.impl.stop_suite() self.testsuite = None return result
def pytest_runtest_protocol(self, item, nextitem): try: # for common items description = item.function.__doc__ except AttributeError: # for doctests that has no `function` attribute description = item.reportinfo()[2] self.test = TestCase(name='.'.join(mangle_testnames([x.name for x in parent_down_from_module(item)])), description=description, start=now(), attachments=[], labels=labels_of(item), status=None, steps=[], id=str(uuid.uuid4())) # for later resolution in AllureAgregatingListener.pytest_sessionfinish self.stack = [self.test] yield self.test = None self.stack = []