aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/allure-python-commons/allure_commons/_hooks.py
diff options
context:
space:
mode:
authoriddqd <iddqd@yandex-team.com>2024-05-13 17:19:30 +0300
committeriddqd <iddqd@yandex-team.com>2024-05-13 17:28:44 +0300
commit84d127b9b7e96ba4352e3f5ddc9222aee9a66053 (patch)
tree2ebb2689abf65e68dfe92a3ca9b161b4b6ae183f /contrib/python/allure-python-commons/allure_commons/_hooks.py
parentb7deb7f0b71db7419781d1b0357dfa443ccc3ff1 (diff)
downloadydb-84d127b9b7e96ba4352e3f5ddc9222aee9a66053.tar.gz
Add allure support to ydb github export
d6cba27d09fb5e50a99c36070a6a3545c8393ea1
Diffstat (limited to 'contrib/python/allure-python-commons/allure_commons/_hooks.py')
-rw-r--r--contrib/python/allure-python-commons/allure_commons/_hooks.py102
1 files changed, 102 insertions, 0 deletions
diff --git a/contrib/python/allure-python-commons/allure_commons/_hooks.py b/contrib/python/allure-python-commons/allure_commons/_hooks.py
new file mode 100644
index 0000000000..0ff19a27d3
--- /dev/null
+++ b/contrib/python/allure-python-commons/allure_commons/_hooks.py
@@ -0,0 +1,102 @@
+from pluggy import HookspecMarker, HookimplMarker
+
+hookspec = HookspecMarker("allure")
+hookimpl = HookimplMarker("allure")
+
+
+class AllureUserHooks:
+
+ @hookspec
+ def decorate_as_title(self, test_title):
+ """ title """
+
+ @hookspec
+ def add_title(self, test_title):
+ """ title """
+
+ @hookspec
+ def decorate_as_description(self, test_description):
+ """ description """
+
+ @hookspec
+ def add_description(self, test_description):
+ """ description """
+
+ @hookspec
+ def decorate_as_description_html(self, test_description_html):
+ """ description html"""
+
+ @hookspec
+ def add_description_html(self, test_description_html):
+ """ description html"""
+
+ @hookspec
+ def decorate_as_label(self, label_type, labels):
+ """ label """
+
+ @hookspec
+ def add_label(self, label_type, labels):
+ """ label """
+
+ @hookspec
+ def decorate_as_link(self, url, link_type, name):
+ """ url """
+
+ @hookspec
+ def add_link(self, url, link_type, name):
+ """ url """
+
+ @hookspec
+ def add_parameter(self, name, value, excluded, mode):
+ """ parameter """
+
+ @hookspec
+ def start_step(self, uuid, title, params):
+ """ step """
+
+ @hookspec
+ def stop_step(self, uuid, exc_type, exc_val, exc_tb):
+ """ step """
+
+ @hookspec
+ def attach_data(self, body, name, attachment_type, extension):
+ """ attach data """
+
+ @hookspec
+ def attach_file(self, source, name, attachment_type, extension):
+ """ attach file """
+
+
+class AllureDeveloperHooks:
+
+ @hookspec
+ def start_fixture(self, parent_uuid, uuid, name, parameters):
+ """ start fixture"""
+
+ @hookspec
+ def stop_fixture(self, parent_uuid, uuid, name, exc_type, exc_val, exc_tb):
+ """ stop fixture """
+
+ @hookspec
+ def start_test(self, parent_uuid, uuid, name, parameters, context):
+ """ start test"""
+
+ @hookspec
+ def stop_test(self, parent_uuid, uuid, name, context, exc_type, exc_val, exc_tb):
+ """ stop test """
+
+ @hookspec
+ def report_result(self, result):
+ """ reporting """
+
+ @hookspec
+ def report_container(self, container):
+ """ reporting """
+
+ @hookspec
+ def report_attached_file(self, source, file_name):
+ """ reporting """
+
+ @hookspec
+ def report_attached_data(self, body, file_name):
+ """ reporting """