testsuite.event_notifications ============================= .. py:module:: testsuite.event_notifications Attributes ---------- .. autoapisummary:: testsuite.event_notifications.logger Exceptions ---------- .. autoapisummary:: testsuite.event_notifications.InvalidNotifyCommand Classes ------- .. autoapisummary:: testsuite.event_notifications.TestNotification testsuite.event_notifications.TestQueueNotification testsuite.event_notifications.TestStartNotification testsuite.event_notifications.TestResultNotification testsuite.event_notifications.TestEndNotification testsuite.event_notifications.EventNotifier Module Contents --------------- .. py:data:: logger .. py:class:: TestNotification Notification for a given test. .. py:attribute:: test_name :type: str Name of the test that this notification refers to. .. py:method:: to_args() -> list[str] :abstractmethod: .. py:class:: TestQueueNotification Bases: :py:obj:`TestNotification` Notification to signal that a test was queued. .. py:method:: to_args() -> list[str] .. py:class:: TestStartNotification Bases: :py:obj:`TestNotification` Notification to signal that the execution of a test has just started. .. py:method:: to_args() -> list[str] .. py:class:: TestResultNotification Bases: :py:obj:`TestNotification` Notification to signal the addition of a new test result. .. py:attribute:: result :type: e3.testsuite.result.TestResultSummary Summary for the added test result. .. py:attribute:: yaml_result_filename :type: str Absolute filename for the YAML file that stores the test result. This YAML file must be loaded through the ``TestResult.load`` static method. .. py:method:: to_args() -> list[str] .. py:class:: TestEndNotification Bases: :py:obj:`TestNotification` Notification to signal that the execution of a test has just ended. .. py:method:: to_args() -> list[str] .. py:exception:: InvalidNotifyCommand Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. .. py:class:: EventNotifier(testsuite: e3.testsuite.TestsuiteCore, notify_cmd: str | None) Abstraction to send notifications. .. py:attribute:: python_cmd_re .. py:attribute:: notify_callback :type: Callable[[TestNotification], None] | None :value: None .. py:attribute:: notify_cmd :type: list[str] | None :value: None .. py:method:: _parse_notify_cmd(testsuite: e3.testsuite.TestsuiteCore, cmd: str | None) -> None Decode the given notify command. .. py:method:: notify(notification: TestNotification) -> None Send a given notification. .. py:method:: notify_test_queue(test_name: str) -> None .. py:method:: notify_test_start(test_name: str) -> None .. py:method:: notify_test_result(test_name: str, result: e3.testsuite.result.TestResultSummary, yaml_result_filename: str) -> None .. py:method:: notify_test_end(test_name: str) -> None