How to use allure-python-commons - 10 common examples

To help you get started, we’ve selected a few allure-python-commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github allure-framework / allure-python / allure-python-commons / src / _core.py View on Github external
def get_plugin_manager():
        if not hasattr(MetaPluginManager._storage, 'plugin_manager'):
            MetaPluginManager._storage.plugin_manager = PluginManager('allure')
            MetaPluginManager._storage.plugin_manager.add_hookspecs(_hooks.AllureUserHooks)
            MetaPluginManager._storage.plugin_manager.add_hookspecs(_hooks.AllureDeveloperHooks)

        return MetaPluginManager._storage.plugin_manager
github allure-framework / allure-python / allure-python-commons / src / _core.py View on Github external
def get_plugin_manager():
        if not hasattr(MetaPluginManager._storage, 'plugin_manager'):
            MetaPluginManager._storage.plugin_manager = PluginManager('allure')
            MetaPluginManager._storage.plugin_manager.add_hookspecs(_hooks.AllureUserHooks)
            MetaPluginManager._storage.plugin_manager.add_hookspecs(_hooks.AllureDeveloperHooks)

        return MetaPluginManager._storage.plugin_manager
github allure-framework / allure-python / allure-python-commons / src / model2.py View on Github external
class ExecutableItem(object):
    name = attrib(default=None)
    status = attrib(default=None)
    statusDetails = attrib(default=None)
    stage = attrib(default=None)
    description = attrib(default=None)
    descriptionHtml = attrib(default=None)
    steps = attrib(default=Factory(list))
    attachments = attrib(default=Factory(list))
    parameters = attrib(default=Factory(list))
    start = attrib(default=None)
    stop = attrib(default=None)


@attrs
class TestResult(ExecutableItem):
    file_pattern = TEST_CASE_PATTERN

    uuid = attrib(default=None)
    historyId = attrib(default=None)
    testCaseId = attrib(default=None)
    fullName = attrib(default=None)
    labels = attrib(default=Factory(list))
    links = attrib(default=Factory(list))


@attrs
class TestStepResult(ExecutableItem):
    id = attrib(default=None)


@attrs
github allure-framework / allure-python / allure-python-commons / src / model2.py View on Github external
@attrs
class TestResult(ExecutableItem):
    file_pattern = TEST_CASE_PATTERN

    uuid = attrib(default=None)
    historyId = attrib(default=None)
    testCaseId = attrib(default=None)
    fullName = attrib(default=None)
    labels = attrib(default=Factory(list))
    links = attrib(default=Factory(list))


@attrs
class TestStepResult(ExecutableItem):
    id = attrib(default=None)


@attrs
class TestBeforeResult(ExecutableItem):
    pass


@attrs
class TestAfterResult(ExecutableItem):
    pass


@attrs
class Parameter(object):
    name = attrib(default=None)
github allure-framework / allure-python / allure-python-commons / src / model2.py View on Github external
labels = attrib(default=Factory(list))
    links = attrib(default=Factory(list))


@attrs
class TestStepResult(ExecutableItem):
    id = attrib(default=None)


@attrs
class TestBeforeResult(ExecutableItem):
    pass


@attrs
class TestAfterResult(ExecutableItem):
    pass


@attrs
class Parameter(object):
    name = attrib(default=None)
    value = attrib(default=None)


@attrs
class Label(object):
    name = attrib(default=None)
    value = attrib(default=None)


@attrs
github allure-framework / allure-python / allure-python-commons / src / lifecycle.py View on Github external
def start_step(self, parent_uuid=None, uuid=None):
        parent = self._get_item(uuid=parent_uuid, item_type=ExecutableItem)
        step = TestStepResult()
        step.start = now()
        parent.steps.append(step)
        self._items[uuid or uuid4()] = step
        yield step
github allure-framework / allure-python / allure-python-commons / src / model2.py View on Github external
uuid = attrib(default=None)
    historyId = attrib(default=None)
    testCaseId = attrib(default=None)
    fullName = attrib(default=None)
    labels = attrib(default=Factory(list))
    links = attrib(default=Factory(list))


@attrs
class TestStepResult(ExecutableItem):
    id = attrib(default=None)


@attrs
class TestBeforeResult(ExecutableItem):
    pass


@attrs
class TestAfterResult(ExecutableItem):
    pass


@attrs
class Parameter(object):
    name = attrib(default=None)
    value = attrib(default=None)


@attrs
class Label(object):
github allure-framework / allure-python / allure-python-commons / src / _allure.py View on Github external
def impl(*a, **kw):
            __tracebackhide__ = True
            params = func_parameters(func, *a, **kw)
            args = list(map(lambda x: represent(x), a))
            with StepContext(self.title.format(*args, **params), params):
                return func(*a, **kw)
        return impl
github allure-framework / allure-python / allure-python-commons / src / _allure.py View on Github external
def step(title):
    if callable(title):
        return StepContext(title.__name__, {})(title)
    else:
        return StepContext(title, {})
github allure-framework / allure-python / allure-python-commons / src / _allure.py View on Github external
def step(title):
    if callable(title):
        return StepContext(title.__name__, {})(title)
    else:
        return StepContext(title, {})