testsuite.running_status ======================== .. py:module:: testsuite.running_status Classes ------- .. autoapisummary:: testsuite.running_status.RunningStatus Module Contents --------------- .. py:class:: RunningStatus(filename: str, update_interval: float = 1.0, max_consecutive_failures: int = 0) .. py:attribute:: dag :type: Optional[e3.collection.dag.DAG] :value: None .. py:attribute:: filename .. py:attribute:: lock .. py:attribute:: running :type: Dict[str, int] Set of test fragments ids currently running, indexed by UID. The dict values come from the builtin `id()` function called on the test fragments. .. py:attribute:: completed :type: Dict[str, int] Set of test fragments ids that completed their job, indexed by UID. The dict values come from the builtin `id()` function called on the test fragments. .. py:attribute:: status_counters :type: Dict[e3.testsuite.result.TestStatus, int] Snapshot of the testsuite's report index status counters. We preserve a copy to avoid inconsistent state due to race conditions: these counters are updated in the collect_result method while the other sets are updated in TestFragment.run, which is executed in workers (i.e. other threads). .. py:attribute:: update_interval :value: 1.0 .. py:attribute:: no_update_before :value: 0.0 .. py:attribute:: max_consecutive_failures :value: 0 .. py:attribute:: consecutive_failures :value: 0 Number of consecutive failure/error results we just processed. Used to abort the testsuite when there are too many issues. .. py:attribute:: aborted_too_many_failures :value: False Whether the testsuite aborted because of too many consecutive test failures (see the --max-consecutive-failures command-line option). .. py:method:: set_dag(dag: e3.collection.dag.DAG) -> None Set the DAG that contains TestFragment instances. .. py:method:: start(fragment: e3.testsuite.fragment.TestFragment) -> None Put a fragment in the "running" set. .. py:method:: complete(fragment: e3.testsuite.fragment.TestFragment) -> None Move a fragment from the "running" set to the "completed" set. .. py:method:: process_result(result: e3.testsuite.result.TestResultSummary) -> None Integrate a test result in the testsuite status. This increments status counters and triggers testsuite abortion if there were too many consecutive failures. .. py:method:: dump() -> None Write a report for this status as human-readable text to "fp".