SYMBOL INDEX (2415 symbols across 205 files) FILE: conftest.py function add_doctest_context (line 8) | def add_doctest_context(doctest_namespace): # noqa: PT004 function pytest_ignore_collect (line 32) | def pytest_ignore_collect(collection_path, config): function has_dot_installed (line 41) | def has_dot_installed(): function requires_dot_installed (line 46) | def requires_dot_installed(request, has_dot_installed): FILE: docs/conf.py function dummy_write_computation_times (line 298) | def dummy_write_computation_times(gallery_conf, target_dir, costs): FILE: statemachine/callbacks.py function allways_true (line 23) | def allways_true(*args, **kwargs): class CallbackPriority (line 27) | class CallbackPriority(IntEnum): class SpecReference (line 35) | class SpecReference(IntFlag): class CallbackGroup (line 45) | class CallbackGroup(IntEnum): method build_key (line 56) | def build_key(self, specs: "CallbackSpecList") -> str: class CallbackSpec (line 60) | class CallbackSpec: method __init__ (line 72) | def __init__( method __repr__ (line 112) | def __repr__(self): method __str__ (line 115) | def __str__(self): method __eq__ (line 121) | def __eq__(self, other): method __hash__ (line 124) | def __hash__(self): class SpecListGrouper (line 128) | class SpecListGrouper: method __init__ (line 129) | def __init__(self, list: "CallbackSpecList", group: CallbackGroup) -> ... method add (line 134) | def add(self, callbacks, **kwargs): method __call__ (line 138) | def __call__(self, callback): method _add_unbounded_callback (line 141) | def _add_unbounded_callback(self, func, is_event=False, transitions=No... method __iter__ (line 150) | def __iter__(self): class CallbackSpecList (line 154) | class CallbackSpecList: method __init__ (line 157) | def __init__(self, factory=CallbackSpec): method __repr__ (line 163) | def __repr__(self): method _add_unbounded_callback (line 166) | def _add_unbounded_callback(self, func, transitions=None, **kwargs): method __iter__ (line 194) | def __iter__(self): method clear (line 197) | def clear(self): method grouper (line 200) | def grouper(self, group: CallbackGroup) -> SpecListGrouper: method _add (line 205) | def _add(self, func, group: CallbackGroup, **kwargs): method add (line 219) | def add(self, callbacks, group: CallbackGroup, **kwargs): class CallbackWrapper (line 230) | class CallbackWrapper: method __init__ (line 231) | def __init__( method __repr__ (line 245) | def __repr__(self): method __str__ (line 248) | def __str__(self): method __lt__ (line 251) | def __lt__(self, other): method __call__ (line 254) | async def __call__(self, *args, **kwargs): method call (line 263) | def call(self, *args, **kwargs): class CallbacksExecutor (line 270) | class CallbacksExecutor: method __init__ (line 273) | def __init__(self): method __iter__ (line 277) | def __iter__(self): method __repr__ (line 280) | def __repr__(self): method __str__ (line 283) | def __str__(self): method add (line 286) | def add(self, key: str, spec: CallbackSpec, builder: Callable[[], Call... method async_call (line 302) | async def async_call( method async_all (line 323) | async def async_all( method call (line 337) | def call(self, *args, on_error: "Callable[[Exception], None] | None" =... method all (line 354) | def all(self, *args, on_error: "Callable[[Exception], None] | None" = ... method visit (line 366) | def visit(self, visitor_fn, *args, **kwargs): method async_visit (line 372) | async def async_visit(self, visitor_fn, *args, **kwargs): class CallbacksRegistry (line 381) | class CallbacksRegistry: method __init__ (line 382) | def __init__(self) -> None: method __getitem__ (line 386) | def __getitem__(self, key: str) -> CallbacksExecutor: method __contains__ (line 389) | def __contains__(self, key: str) -> bool: method check (line 392) | def check(self, specs: CallbackSpecList): method async_or_sync (line 412) | def async_or_sync(self): method call (line 417) | def call( method async_call (line 428) | async def async_call( method all (line 439) | def all( method async_all (line 450) | async def async_all( method visit (line 461) | def visit(self, key: str, visitor_fn, *args, **kwargs): method async_visit (line 466) | async def async_visit(self, key: str, visitor_fn, *args, **kwargs): method str (line 471) | def str(self, key: str) -> str: FILE: statemachine/configuration.py class Configuration (line 17) | class Configuration: method __init__ (line 35) | def __init__( method value (line 52) | def value(self) -> Any: method value (line 57) | def value(self, val: Any): method values (line 66) | def values(self) -> OrderedSet[Any]: method states (line 73) | def states(self) -> "OrderedSet[State]": method states (line 89) | def states(self, new_configuration: "OrderedSet[State]"): method add (line 94) | def add(self, state: "State"): method discard (line 100) | def discard(self, state: "State"): method current_state (line 109) | def current_state(self) -> "State | OrderedSet[State]": method _read_from_model (line 136) | def _read_from_model(self) -> OrderedSet: method _write_to_model (line 147) | def _write_to_model(self, values: OrderedSet): method _invalidate (line 160) | def _invalidate(self): FILE: statemachine/contrib/diagram/__init__.py class DotGraphMachine (line 13) | class DotGraphMachine: method __init__ (line 40) | def __init__(self, machine): method _build_config (line 43) | def _build_config(self) -> DotRendererConfig: method get_graph (line 53) | def get_graph(self): method __call__ (line 58) | def __call__(self): class MermaidGraphMachine (line 62) | class MermaidGraphMachine: method __init__ (line 69) | def __init__(self, machine): method _build_config (line 72) | def _build_config(self) -> MermaidRendererConfig: method get_mermaid (line 79) | def get_mermaid(self) -> str: method __call__ (line 84) | def __call__(self) -> str: function quickchart_write_svg (line 88) | def quickchart_write_svg(sm, path: str): function _find_sm_class (line 128) | def _find_sm_class(module): function import_sm (line 144) | def import_sm(qualname): function write_image (line 167) | def write_image(qualname, out, events=None, fmt=None): function main (line 210) | def main(argv=None): FILE: statemachine/contrib/diagram/extract.py function _determine_state_type (line 22) | def _determine_state_type(state: "State") -> StateType: function _actions_getter (line 37) | def _actions_getter(machine: "MachineRef"): function _extract_state_actions (line 53) | def _extract_state_actions(state: "State", getter) -> List[DiagramAction]: function _extract_state (line 75) | def _extract_state( function _format_event_names (line 105) | def _format_event_names(transition: "Transition") -> str: function _extract_transitions_from_state (line 134) | def _extract_transitions_from_state(state: "State") -> List[DiagramTrans... function _extract_all_transitions (line 155) | def _extract_all_transitions(states) -> List[DiagramTransition]: function _collect_compound_ids (line 169) | def _collect_compound_ids(states: List[DiagramState]) -> Set[str]: function _collect_bidirectional_compound_ids (line 179) | def _collect_bidirectional_compound_ids( function _mark_initial_transitions (line 200) | def _mark_initial_transitions( function _resolve_initial_states (line 210) | def _resolve_initial_states(states: List[DiagramState]) -> None: function extract (line 242) | def extract(machine_or_class: "MachineRef") -> DiagramGraph: FILE: statemachine/contrib/diagram/formatter.py class Formatter (line 32) | class Formatter: method __init__ (line 35) | def __init__(self) -> None: method register_format (line 38) | def register_format( method render (line 59) | def render(self, machine_or_class: "MachineRef", fmt: str) -> str: method supported_formats (line 81) | def supported_formats(self) -> List[str]: method _primary_name (line 85) | def _primary_name(self, fn: "Callable[[MachineRef], str]") -> str: function _render_dot (line 103) | def _render_dot(machine_or_class: "MachineRef") -> str: function _render_svg (line 110) | def _render_svg(machine_or_class: "MachineRef") -> str: function _render_mermaid (line 118) | def _render_mermaid(machine_or_class: "MachineRef") -> str: function _render_md (line 125) | def _render_md(machine_or_class: "MachineRef") -> str: function _render_rst (line 133) | def _render_rst(machine_or_class: "MachineRef") -> str: FILE: statemachine/contrib/diagram/model.py class StateType (line 8) | class StateType(Enum): class ActionType (line 22) | class ActionType(Enum): class DiagramAction (line 29) | class DiagramAction: class DiagramState (line 35) | class DiagramState: class DiagramTransition (line 47) | class DiagramTransition: class DiagramGraph (line 58) | class DiagramGraph: FILE: statemachine/contrib/diagram/renderers/dot.py function _escape_html (line 18) | def _escape_html(text: str) -> str: class DotRendererConfig (line 24) | class DotRendererConfig: class DotRenderer (line 38) | class DotRenderer: method __init__ (line 47) | def __init__(self, config: Optional[DotRendererConfig] = None): method render (line 52) | def render(self, graph: DiagramGraph) -> pydot.Dot: method _create_graph (line 60) | def _create_graph(self, name: str) -> pydot.Dot: method _state_node_id (line 103) | def _state_node_id(self, state_id: str) -> str: method _compound_edge_anchor (line 109) | def _compound_edge_anchor(self, state_id: str, direction: str) -> str: method _render_states (line 120) | def _render_states( method _place_extra_nodes (line 178) | def _place_extra_nodes( method _render_initial_arrow (line 199) | def _render_initial_arrow( method _create_initial_node (line 248) | def _create_initial_node(self, node_id: str) -> pydot.Node: method _create_atomic_node (line 262) | def _create_atomic_node(self, state: DiagramState) -> pydot.Node: method _build_html_table_label (line 307) | def _build_html_table_label( method _format_action (line 339) | def _format_action(action: DiagramAction) -> str: method _create_history_node (line 344) | def _create_history_node(self, state: DiagramState) -> pydot.Node: method _create_compound_anchor_nodes (line 359) | def _create_compound_anchor_nodes(self, state: DiagramState) -> List[p... method _create_compound_subgraph (line 395) | def _create_compound_subgraph(self, state: DiagramState) -> pydot.Subg... method _build_compound_label (line 414) | def _build_compound_label(self, state: DiagramState) -> str: method _add_transitions_for_state (line 432) | def _add_transitions_for_state( method _create_edges (line 448) | def _create_edges(self, transition: DiagramTransition) -> List[pydot.E... method _create_single_edge (line 462) | def _create_single_edge( method _resolve_edge_endpoints (line 482) | def _resolve_edge_endpoints( method _build_edge_label (line 516) | def _build_edge_label(self, event: str, cond_html: str, index: int) ->... FILE: statemachine/contrib/diagram/renderers/mermaid.py class MermaidRendererConfig (line 16) | class MermaidRendererConfig: class MermaidRenderer (line 24) | class MermaidRenderer: method __init__ (line 37) | def __init__(self, config: Optional[MermaidRendererConfig] = None): method render (line 46) | def render(self, graph: DiagramGraph) -> str: method _build_initial_child_map (line 73) | def _build_initial_child_map(self, states: List[DiagramState]) -> Dict... method _collect_parallel_descendants (line 85) | def _collect_parallel_descendants( method _build_all_descendants_map (line 100) | def _build_all_descendants_map(self, states: List[DiagramState]) -> Di... method _collect_recursive_descendants (line 110) | def _collect_recursive_descendants(states: List[DiagramState]) -> Set[... method _resolve_endpoint (line 118) | def _resolve_endpoint(self, state_id: str) -> str: method _render_states (line 133) | def _render_states( method _render_atomic_state (line 167) | def _render_atomic_state( method _render_compound_state (line 186) | def _render_compound_state( method _collect_all_descendant_ids (line 230) | def _collect_all_descendant_ids(self, states: List[DiagramState]) -> S... method _render_scope_transitions (line 237) | def _render_scope_transitions( method _is_fully_internal (line 296) | def _is_fully_internal( method _render_single_transition (line 307) | def _render_single_transition( method _format_action (line 329) | def _format_action(action: DiagramAction) -> str: method _render_initial_and_final (line 334) | def _render_initial_and_final( FILE: statemachine/contrib/diagram/renderers/table.py class TransitionTableRenderer (line 8) | class TransitionTableRenderer: method render (line 11) | def render(self, graph: DiagramGraph, fmt: str = "md") -> str: method _collect_rows (line 27) | def _collect_rows( method _build_state_name_map (line 53) | def _build_state_name_map(self, states: List[DiagramState]) -> dict: method _render_md (line 62) | def _render_md(self, rows: "List[tuple[str, str, str, str]]") -> str: method _render_rst (line 82) | def _render_rst(self, rows: "List[tuple[str, str, str, str]]") -> str: FILE: statemachine/contrib/diagram/sphinx_ext.py function _align_spec (line 32) | def _align_spec(argument: str) -> str: function _parse_events (line 36) | def _parse_events(value: str) -> list[str]: class StateMachineDiagram (line 49) | class StateMachineDiagram(SphinxDirective): method run (line 78) | def run(self) -> list[nodes.Node]: method _run_mermaid (line 151) | def _run_mermaid(self, machine: object, formatter: Any, qualname: str)... method _prepare_svg (line 190) | def _prepare_svg(self, svg_text: str) -> tuple[str, str, str]: method _build_svg_styles (line 206) | def _build_svg_styles(self, intrinsic_width: str, intrinsic_height: st... method _resolve_target (line 235) | def _resolve_target(self, svg_text: str) -> str: method _build_wrapper_classes (line 263) | def _build_wrapper_classes(self) -> list[str]: function _split_length (line 270) | def _split_length(value: str) -> tuple[float, str]: function setup (line 278) | def setup(app: "Sphinx") -> dict[str, Any]: FILE: statemachine/contrib/timeout.py class _Timeout (line 24) | class _Timeout: method __init__ (line 27) | def __init__(self, duration: float, on: "str | None" = None): method run (line 31) | def run(self, ctx: "InvokeContext") -> Any: method __repr__ (line 45) | def __repr__(self) -> str: function timeout (line 52) | def timeout(duration: float, *, on: "str | None" = None) -> _Timeout: FILE: statemachine/contrib/weighted.py class _WeightedGroup (line 16) | class _WeightedGroup: method __init__ (line 23) | def __init__(self, weights: List[float], seed: "int | float | str | No... method select (line 29) | def select(self) -> int: method selected (line 35) | def selected(self) -> "int | None": function _make_weighted_cond (line 39) | def _make_weighted_cond(index: int, group: _WeightedGroup, weight: float... function to (line 69) | def to(target: "State", weight: "int | float", **kwargs: Any) -> _Weight... function _validate_dest (line 100) | def _validate_dest(i: int, item: Any) -> "Tuple[State, float, Dict[str, ... function weighted_transitions (line 136) | def weighted_transitions( FILE: statemachine/dispatcher.py class Listener (line 31) | class Listener: method from_obj (line 44) | def from_obj(cls, obj, skip_attrs=None) -> "Listener": method build_key (line 53) | def build_key(self, attr_name) -> str: class Listeners (line 58) | class Listeners: method from_listeners (line 65) | def from_listeners(cls, listeners: Iterable["Listener"]) -> "Listeners": method resolve (line 70) | def resolve( method _take_callback (line 88) | def _take_callback(self, name: str, names_not_found_handler: Callable)... method build (line 103) | def build(self, spec: "CallbackSpec"): method search (line 134) | def search(self, spec: "CallbackSpec"): method _search_property (line 144) | def _search_property(self, spec): method _search_callable (line 159) | def _search_callable(self, spec): method search_name (line 171) | def search_name(self, name): function callable_method (line 189) | def callable_method(a_callable) -> Callable: function attr_method (line 213) | def attr_method(attribute, obj) -> Callable: function event_method (line 223) | def event_method(func) -> Callable: function resolver_factory_from_objects (line 231) | def resolver_factory_from_objects(*objects: Tuple[Any, ...]): FILE: statemachine/engines/async_.py class AsyncEngine (line 31) | class AsyncEngine(BaseEngine): method put (line 38) | def put(self, trigger_data: TriggerData, internal: bool = False, _dela... method _resolve_future (line 57) | def _resolve_future(future: "asyncio.Future[object] | None", result): method _reject_future (line 63) | def _reject_future(future: "asyncio.Future[object] | None", exc: Excep... method _reject_pending_futures (line 68) | def _reject_pending_futures(self, exc: Exception): method _get_args_kwargs (line 74) | async def _get_args_kwargs( method _conditions_match (line 96) | async def _conditions_match(self, transition: "Transition", trigger_da... method _first_transition_that_matches (line 107) | async def _first_transition_that_matches( # type: ignore[override] method _select_transitions (line 124) | async def _select_transitions( # type: ignore[override] method select_eventless_transitions (line 138) | async def select_eventless_transitions(self, trigger_data: TriggerData): method select_transitions (line 141) | async def select_transitions(self, trigger_data: TriggerData) -> "Orde... method _execute_transition_content (line 144) | async def _execute_transition_content( method _exit_states (line 166) | async def _exit_states( # type: ignore[override] method _enter_states (line 189) | async def _enter_states( # noqa: C901 method microstep (line 273) | async def microstep(self, transitions: "List[Transition]", trigger_dat... method _run_microstep (line 321) | async def _run_microstep(self, enabled_transitions, trigger_data): # ... method activate_initial_state (line 334) | async def activate_initial_state(self, **kwargs): method processing_loop (line 346) | async def processing_loop( # noqa: C901 method enabled_events (line 502) | async def enabled_events(self, *args, **kwargs): FILE: statemachine/engines/base.py class StateTransition (line 33) | class StateTransition: class EventQueue (line 38) | class EventQueue: method __init__ (line 39) | def __init__(self): method __repr__ (line 42) | def __repr__(self): method is_empty (line 45) | def is_empty(self): method put (line 48) | def put(self, trigger_data: TriggerData): method pop (line 52) | def pop(self): method clear (line 56) | def clear(self): method reject_futures (line 60) | def reject_futures(self, exc: Exception): method remove (line 72) | def remove(self, send_id: str): class BaseEngine (line 86) | class BaseEngine: method __init__ (line 87) | def __init__(self, sm: "StateChart"): method empty (line 102) | def empty(self): # pragma: no cover method clear_cache (line 105) | def clear_cache(self): method put (line 109) | def put(self, trigger_data: TriggerData, internal: bool = False, _dela... method pop (line 127) | def pop(self): # pragma: no cover method clear (line 130) | def clear(self): method cancel_event (line 133) | def cancel_event(self, send_id: str): method _on_error_handler (line 137) | def _on_error_handler(self) -> "Callable[[Exception], None] | None": method _handle_error (line 159) | def _handle_error(self, error: Exception, trigger_data: TriggerData): method _send_error_execution (line 170) | def _send_error_execution(self, error: Exception, trigger_data: Trigge... method start (line 186) | def start(self, **kwargs): method _initial_transitions (line 192) | def _initial_transitions(self, trigger_data): method _filter_conflicting_transitions (line 202) | def _filter_conflicting_transitions( method _compute_exit_set (line 246) | def _compute_exit_set(self, transitions: List[Transition]) -> OrderedS... method get_transition_domain (line 262) | def get_transition_domain(self, transition: Transition) -> "State | No... method find_lcca (line 289) | def find_lcca(states: List[State]) -> "State | None": method get_effective_target_states (line 312) | def get_effective_target_states(self, transition: Transition) -> Order... method select_eventless_transitions (line 329) | def select_eventless_transitions(self, trigger_data: TriggerData): method select_transitions (line 335) | def select_transitions(self, trigger_data: TriggerData) -> OrderedSet[... method _first_transition_that_matches (line 341) | def _first_transition_that_matches( method _select_transitions (line 358) | def _select_transitions( method microstep (line 374) | def microstep(self, transitions: List[Transition], trigger_data: Trigg... method _get_args_kwargs (line 423) | def _get_args_kwargs( method _conditions_match (line 448) | def _conditions_match(self, transition: Transition, trigger_data: Trig... method _prepare_exit_states (line 455) | def _prepare_exit_states( method _remove_state_from_configuration (line 488) | def _remove_state_from_configuration(self, state: State): method _exit_states (line 493) | def _exit_states( method _execute_transition_content (line 516) | def _execute_transition_content( method _prepare_entry_states (line 538) | def _prepare_entry_states( method _add_state_to_configuration (line 573) | def _add_state_to_configuration(self, target: State): method stop (line 578) | def stop(self): method __del__ (line 587) | def __del__(self): method _handle_final_state (line 593) | def _handle_final_state(self, target: State, on_entry_result: list): method _enter_states (line 627) | def _enter_states( # noqa: C901 method compute_entry_set (line 714) | def compute_entry_set( method add_descendant_states_to_enter (line 749) | def add_descendant_states_to_enter( # noqa: C901 method add_ancestor_states_to_enter (line 884) | def add_ancestor_states_to_enter( method _check_root_final_state (line 922) | def _check_root_final_state(self): method is_in_final_state (line 945) | def is_in_final_state(self, state: State) -> bool: FILE: statemachine/engines/sync.py class SyncEngine (line 17) | class SyncEngine(BaseEngine): method _run_microstep (line 18) | def _run_microstep(self, enabled_transitions, trigger_data): method start (line 31) | def start(self, **kwargs): method activate_initial_state (line 37) | def activate_initial_state(self, **kwargs): method processing_loop (line 59) | def processing_loop(self, caller_future=None): # noqa: C901 method enabled_events (line 178) | def enabled_events(self, *args, **kwargs): FILE: statemachine/event.py function _expand_event_id (line 20) | def _expand_event_id(key: str) -> str: class Event (line 50) | class Event(AddCallbacksMixin, str): method __new__ (line 79) | def __new__( method __repr__ (line 120) | def __repr__(self): method is_same_event (line 125) | def is_same_event(self, *_args, event: "str | None" = None, **_kwargs)... method _add_callback (line 128) | def _add_callback(self, callback, grouper: CallbackGroup, is_event=Fal... method __get__ (line 140) | def __get__(self, instance, owner): method put (line 152) | def put(self, *args, send_id: "str | None" = None, **kwargs): method build_trigger (line 162) | def build_trigger(self, *args, machine: "StateChart", send_id: "str | ... method __call__ (line 177) | def __call__(self, *args, **kwargs) -> Any: method split (line 190) | def split( # type: ignore[override] method match (line 198) | def match(self, event: str) -> bool: class BoundEvent (line 226) | class BoundEvent(Event): FILE: statemachine/event_data.py class TriggerData (line 15) | class TriggerData: method __post_init__ (line 46) | def __post_init__(self): class EventData (line 53) | class EventData: method __post_init__ (line 69) | def __post_init__(self): method event (line 76) | def event(self): method args (line 80) | def args(self): method extended_kwargs (line 84) | def extended_kwargs(self): FILE: statemachine/events.py class Events (line 5) | class Events: method __init__ (line 8) | def __init__(self): method __str__ (line 11) | def __str__(self): method __repr__ (line 15) | def __repr__(self): method __iter__ (line 18) | def __iter__(self): method add (line 21) | def add(self, events): method match (line 37) | def match(self, event: "str | None"): method _replace (line 42) | def _replace(self, old, new): method is_empty (line 47) | def is_empty(self): FILE: statemachine/exceptions.py class StateMachineError (line 11) | class StateMachineError(Exception): class InvalidDefinition (line 15) | class InvalidDefinition(StateMachineError): class InvalidStateValue (line 19) | class InvalidStateValue(InvalidDefinition): method __init__ (line 22) | def __init__(self, value, msg=None): class AttrNotFound (line 29) | class AttrNotFound(InvalidDefinition): class TransitionNotAllowed (line 33) | class TransitionNotAllowed(StateMachineError): method __init__ (line 36) | def __init__(self, event: "Event | None", configuration: MutableSet["S... FILE: statemachine/factory.py class StateMachineMetaclass (line 26) | class StateMachineMetaclass(type): method __init__ (line 39) | def __init__( method _expand_docstring (line 99) | def _expand_docstring(cls) -> None: method __format__ (line 127) | def __format__(cls, fmt: str) -> str: method _initials_by_document_order (line 132) | def _initials_by_document_order( # noqa: C901 method _unpack_builders_callbacks (line 170) | def _unpack_builders_callbacks(cls): method _check (line 179) | def _check(cls): method _check_initial_state (line 193) | def _check_initial_state(cls): method _check_final_states (line 206) | def _check_final_states(cls): method _check_trap_states (line 218) | def _check_trap_states(cls): method _check_reachable_final_states (line 230) | def _check_reachable_final_states(cls): method _check_disconnected_state (line 244) | def _check_disconnected_state(cls): method _setup (line 258) | def _setup(cls): method _collect_class_listeners (line 275) | def _collect_class_listeners(cls, attrs: Dict[str, Any], bases: Tuple[... method add_inherited (line 296) | def add_inherited(cls, bases): method add_from_attributes (line 305) | def add_from_attributes(cls, attrs): # noqa: C901 method _add_states_from_dict (line 331) | def _add_states_from_dict(cls, states): method _add_unbounded_callback (line 335) | def _add_unbounded_callback(cls, attr_name, func): method add_state (line 343) | def add_state(cls, id, state: State): method add_event (line 358) | def add_event( method _update_event_references (line 381) | def _update_event_references(cls): method events (line 395) | def events(self): FILE: statemachine/graph.py function visit_connected_states (line 10) | def visit_connected_states(state: "State"): function disconnected_states (line 33) | def disconnected_states(starting_state: "State", all_states: MutableSet[... function iterate_states_and_transitions (line 38) | def iterate_states_and_transitions(states: Iterable["State"]): function iterate_states (line 48) | def iterate_states(states: Iterable["State"]): function states_without_path_to_final_states (line 57) | def states_without_path_to_final_states(states: Iterable["State"]): FILE: statemachine/i18n.py function setup_i18n (line 8) | def setup_i18n(): FILE: statemachine/invoke.py class IInvoke (line 37) | class IInvoke(Protocol): method run (line 44) | def run(self, ctx: "InvokeContext") -> Any: ... # pragma: no branch function _stop_child_machine (line 47) | def _stop_child_machine(child: "StateChart | None") -> None: class _InvokeCallableWrapper (line 54) | class _InvokeCallableWrapper: method __init__ (line 66) | def __init__(self, handler: Any): method __call__ (line 76) | def __call__(self, **kwargs): method run (line 79) | def run(self, ctx: "InvokeContext") -> Any: method on_cancel (line 87) | def on_cancel(self): function normalize_invoke_callbacks (line 99) | def normalize_invoke_callbacks(invoke: Any) -> Any: function _needs_wrapping (line 119) | def _needs_wrapping(item: Any) -> bool: class InvokeContext (line 138) | class InvokeContext: class Invocation (line 161) | class Invocation: class StateChartInvoker (line 173) | class StateChartInvoker: method __init__ (line 181) | def __init__(self, child_class: "type[StateChart]"): method run (line 185) | def run(self, _ctx: "InvokeContext") -> Any: method on_cancel (line 191) | def on_cancel(self): class InvokeGroup (line 196) | class InvokeGroup: method __init__ (line 208) | def __init__(self, callables: "List[Callable[..., Any]]"): method run (line 213) | def run(self, ctx: "InvokeContext") -> "List[Any]": method on_cancel (line 234) | def on_cancel(self): method _cancel_remaining (line 242) | def _cancel_remaining(self): function invoke_group (line 248) | def invoke_group(*callables: "Callable[..., Any]") -> InvokeGroup: class InvokeManager (line 265) | class InvokeManager: method __init__ (line 272) | def __init__(self, engine: "BaseEngine"): method _debug (line 278) | def _debug(self): method _log_id (line 282) | def _log_id(self): method sm (line 286) | def sm(self) -> "StateChart": method mark_for_invoke (line 291) | def mark_for_invoke(self, state: "State", event_kwargs: "dict | None" ... method cancel_for_state (line 303) | def cancel_for_state(self, state: "State"): method cancel_all (line 314) | def cancel_all(self): method _cleanup_terminated (line 321) | def _cleanup_terminated(self): method spawn_pending_sync (line 338) | def spawn_pending_sync(self): method _spawn_one_sync (line 353) | def _spawn_one_sync(self, callback: "CallbackWrapper", **kwargs): method _run_sync_handler (line 375) | def _run_sync_handler( method spawn_pending_async (line 412) | async def spawn_pending_async(self): method _spawn_one_async (line 427) | def _spawn_one_async(self, callback: "CallbackWrapper", **kwargs): method _run_async_handler (line 443) | async def _run_async_handler( method _cancel (line 484) | def _cancel(self, invokeid: str): method send_to_child (line 514) | def send_to_child(self, invokeid: str, event: str, **data) -> bool: method handle_external_event (line 531) | def handle_external_event(self, trigger_data) -> None: method _make_context (line 578) | def _make_context( method _resolve_handler (line 593) | def _resolve_handler(underlying: Any) -> "Any | None": FILE: statemachine/io/__init__.py class ActionProtocol (line 19) | class ActionProtocol(Protocol): # pragma: no cover method __call__ (line 20) | def __call__(self, *args, **kwargs) -> Any: ... class TransitionDict (line 23) | class TransitionDict(TypedDict, total=False): class BaseStateKwargs (line 40) | class BaseStateKwargs(TypedDict, total=False): class StateKwargs (line 51) | class StateKwargs(BaseStateKwargs, total=False): class HistoryKwargs (line 56) | class HistoryKwargs(TypedDict, total=False): class HistoryDefinition (line 62) | class HistoryDefinition(HistoryKwargs, total=False): class StateDefinition (line 67) | class StateDefinition(BaseStateKwargs, total=False): function _parse_history (line 74) | def _parse_history( function _parse_states (line 95) | def _parse_states( function create_machine_class_from_definition (line 146) | def create_machine_class_from_definition( FILE: statemachine/io/scxml/actions.py class ParseTime (line 35) | class ParseTime: method parse_delay (line 39) | def parse_delay(cls, delay: "str | None", delayexpr: "str | None", **k... method replace (line 49) | def replace(cls, expr: str) -> str: method time_in_ms (line 56) | def time_in_ms(cls, expr: str) -> float: class _Data (line 87) | class _Data: method __getattr__ (line 90) | def __getattr__(self, name): method get (line 93) | def get(self, name, default=None): class OriginTypeSCXML (line 97) | class OriginTypeSCXML(str): method __eq__ (line 100) | def __eq__(self, other): class EventDataWrapper (line 104) | class EventDataWrapper: method __init__ (line 114) | def __init__(self, event_data=None, *, trigger_data=None): method from_trigger_data (line 136) | def from_trigger_data(cls, trigger_data): method __getattr__ (line 140) | def __getattr__(self, name): method __eq__ (line 145) | def __eq__(self, value): method name (line 150) | def name(self): method data (line 156) | def data(self): function _eval (line 169) | def _eval(expr: str, **kwargs) -> Any: class CallableAction (line 182) | class CallableAction: method __init__ (line 185) | def __init__(self): method __call__ (line 188) | def __call__(self, *args, **kwargs): method __str__ (line 191) | def __str__(self): method __repr__ (line 194) | def __repr__(self): method __name__ (line 198) | def __name__(self): method __code__ (line 202) | def __code__(self): class Cond (line 206) | class Cond(CallableAction): method create (line 210) | def create(cls, cond: "str | None", processor=None): method __init__ (line 217) | def __init__(self, cond: str, processor=None): method __call__ (line 222) | def __call__(self, *args, **kwargs): method _normalize (line 228) | def _normalize(cond: "str | None") -> "str | None": function create_action_callable (line 253) | def create_action_callable(action: Action) -> Callable: class Assign (line 274) | class Assign(CallableAction): method __init__ (line 275) | def __init__(self, action: AssignAction): method __call__ (line 279) | def __call__(self, *args, **kwargs): class Log (line 305) | class Log(CallableAction): method __init__ (line 306) | def __init__(self, action: LogAction): method __call__ (line 310) | def __call__(self, *args, **kwargs): function create_if_action_callable (line 322) | def create_if_action_callable(action: IfAction) -> Callable: function create_foreach_action_callable (line 352) | def create_foreach_action_callable(action: ForeachAction) -> Callable: function create_raise_action_callable (line 381) | def create_raise_action_callable(action: RaiseAction) -> Callable: function _send_to_parent (line 391) | def _send_to_parent(action: SendAction, **kwargs): function _send_to_invoke (line 415) | def _send_to_invoke(action: SendAction, invokeid: str, **kwargs): function create_send_action_callable (line 434) | def create_send_action_callable(action: SendAction) -> Callable: # noqa... function create_cancel_action_callable (line 505) | def create_cancel_action_callable(action: CancelAction) -> Callable: function create_script_action_callable (line 522) | def create_script_action_callable(action: ScriptAction) -> Callable: function create_invoke_init_callable (line 538) | def create_invoke_init_callable() -> Callable: function _create_dataitem_callable (line 562) | def _create_dataitem_callable(action: DataItem) -> Callable: function create_datamodel_action_callable (line 592) | def create_datamodel_action_callable(action: DataModel) -> "Callable | N... class ExecuteBlock (line 613) | class ExecuteBlock(CallableAction): method __init__ (line 616) | def __init__(self, content: ExecutableContent): method __call__ (line 621) | def __call__(self, *args, **kwargs): class DoneDataCallable (line 626) | class DoneDataCallable(CallableAction): method __init__ (line 629) | def __init__(self, donedata: DoneData): method __call__ (line 634) | def __call__(self, *args, **kwargs): FILE: statemachine/io/scxml/invoke.py class SCXMLInvoker (line 33) | class SCXMLInvoker: method __init__ (line 40) | def __init__( method run (line 61) | def run(self, ctx: InvokeContext) -> Any: method on_cancel (line 109) | def on_cancel(self): method on_event (line 116) | def on_event(self, event_name: str, **data): method on_finalize (line 124) | def on_finalize(self, trigger_data): method _resolve_content (line 142) | def _resolve_content(self, machine) -> "str | None": method _evaluate_params (line 175) | def _evaluate_params(self, machine) -> dict: method _create_child_class (line 195) | def _create_child_class(self, scxml_content: str, invokeid: str): class _ChildRefSetter (line 201) | class _ChildRefSetter: method __init__ (line 210) | def __init__(self, invoker: "SCXMLInvoker"): method on_enter_state (line 213) | def on_enter_state(self, machine=None, **kwargs): class _InvokeSession (line 218) | class _InvokeSession: method __init__ (line 221) | def __init__(self, parent, invokeid: str): method send_to_parent (line 225) | def send_to_parent(self, event: str, **data): FILE: statemachine/io/scxml/parser.py function strip_namespaces (line 31) | def strip_namespaces(tree: ET.Element): function _parse_initial (line 43) | def _parse_initial(initial_content: "str | None") -> List[str]: function parse_scxml (line 49) | def parse_scxml(scxml_content: str) -> StateMachineDefinition: # noqa: ... function _find_own_datamodel_elements (line 90) | def _find_own_datamodel_elements(root: ET.Element) -> List[ET.Element]: function parse_datamodel (line 110) | def parse_datamodel(root: ET.Element) -> "DataModel | None": function parse_history (line 141) | def parse_history(state_elem: ET.Element) -> HistoryState: function parse_state (line 158) | def parse_state( # noqa: C901 function parse_donedata (line 235) | def parse_donedata(element: ET.Element) -> DoneData: function parse_transition (line 252) | def parse_transition(trans_elem: ET.Element, initial: bool = False) -> T... function parse_executable_content (line 271) | def parse_executable_content(element: ET.Element) -> ExecutableContent: function parse_element (line 281) | def parse_element(element: ET.Element) -> Action: function parse_raise (line 303) | def parse_raise(element: ET.Element) -> RaiseAction: function parse_assign (line 308) | def parse_assign(element: ET.Element) -> AssignAction: function parse_log (line 322) | def parse_log(element: ET.Element) -> LogAction: function parse_if (line 328) | def parse_if(element: ET.Element) -> IfAction: function parse_foreach (line 344) | def parse_foreach(element: ET.Element) -> ForeachAction: function parse_send (line 352) | def parse_send(element: ET.Element) -> SendAction: function parse_cancel (line 415) | def parse_cancel(element: ET.Element) -> CancelAction: function parse_script (line 421) | def parse_script(element: ET.Element) -> ScriptAction: function parse_invoke (line 426) | def parse_invoke(element: ET.Element) -> InvokeDefinition: FILE: statemachine/io/scxml/processor.py function temporary_directory (line 32) | def temporary_directory(new_current_dir): class IOProcessor (line 41) | class IOProcessor: method __init__ (line 42) | def __init__(self, processor: "SCXMLProcessor", machine: StateChart): method __getitem__ (line 46) | def __getitem__(self, name: str): method location (line 50) | def location(self): method get (line 53) | def get(self, name: str): class SessionData (line 58) | class SessionData: method __post_init__ (line 63) | def __post_init__(self): class SCXMLProcessor (line 67) | class SCXMLProcessor: method __init__ (line 68) | def __init__(self): method parse_scxml_file (line 76) | def parse_scxml_file(self, path: Path): method parse_scxml (line 81) | def parse_scxml(self, sm_name: str, scxml_content: str): method process_definition (line 85) | def process_definition(self, definition, location: str, is_invoked: bo... method _prepare_event (line 126) | def _prepare_event(self, *args, event: Event, **kwargs): method _get_session (line 144) | def _get_session(self, machine: StateChart): method _process_history (line 151) | def _process_history(self, history: Dict[str, HistoryState]) -> Dict[s... method _process_states (line 166) | def _process_states(self, states: Dict[str, State]) -> Dict[str, State... method _process_state (line 172) | def _process_state(self, state: State) -> StateDefinition: # noqa: C901 method _process_invocation (line 212) | def _process_invocation(self, invoke_def: InvokeDefinition) -> SCXMLIn... method _register_child (line 220) | def _register_child(self, scxml_content: str, child_name: str) -> type: method _process_transitions (line 226) | def _process_transitions(self, transitions: List[Transition]): method _add (line 250) | def _add(self, location: str, definition: Dict[str, Any]): method start (line 260) | def start(self, **kwargs): FILE: statemachine/io/scxml/schema.py class Action (line 10) | class Action: method __str__ (line 11) | def __str__(self): class ExecutableContent (line 16) | class ExecutableContent: method __str__ (line 19) | def __str__(self): method is_empty (line 23) | def is_empty(self): class RaiseAction (line 28) | class RaiseAction(Action): class AssignAction (line 33) | class AssignAction(Action): class LogAction (line 40) | class LogAction(Action): class IfBranch (line 46) | class IfBranch(Action): method __str__ (line 50) | def __str__(self): method append (line 53) | def append(self, action: Action): class IfAction (line 58) | class IfAction(Action): class ForeachAction (line 63) | class ForeachAction(Action): class Param (line 71) | class Param: class SendAction (line 78) | class SendAction(Action): class CancelAction (line 93) | class CancelAction(Action): class ScriptAction (line 99) | class ScriptAction(Action): class Transition (line 104) | class Transition: class DoneData (line 114) | class DoneData: class InvokeDefinition (line 120) | class InvokeDefinition: class State (line 135) | class State: class HistoryState (line 150) | class HistoryState: class DataItem (line 157) | class DataItem: class DataModel (line 165) | class DataModel: class StateMachineDefinition (line 171) | class StateMachineDefinition: FILE: statemachine/mixins.py class MachineMixin (line 5) | class MachineMixin: method __init__ (line 22) | def __init__(self, *args, **kwargs): method _is_django_historical_model (line 41) | def _is_django_historical_model(cls) -> bool: FILE: statemachine/model.py class Model (line 1) | class Model: method __init__ (line 2) | def __init__(self): method __repr__ (line 6) | def __repr__(self): FILE: statemachine/orderedset.py class OrderedSet (line 10) | class OrderedSet(MutableSet[T]): method __init__ (line 74) | def __init__(self, iterable: "Iterable[T] | None" = None): method add (line 77) | def add(self, x: T) -> None: method clear (line 80) | def clear(self) -> None: method discard (line 83) | def discard(self, x: T) -> None: method __getitem__ (line 86) | def __getitem__(self, index) -> T: method __contains__ (line 92) | def __contains__(self, x: object) -> bool: method __len__ (line 95) | def __len__(self) -> int: method __iter__ (line 98) | def __iter__(self) -> Iterator[T]: method __str__ (line 101) | def __str__(self): method __repr__ (line 104) | def __repr__(self): method union (line 107) | def union(self, *others: Iterable[T]) -> "OrderedSet[T]": method update (line 114) | def update(self, *others: Iterable[T]) -> None: FILE: statemachine/registry.py function autodiscover_modules (line 10) | def autodiscover_modules(module_name: str): function register (line 18) | def register(cls): function get_machine_cls (line 23) | def get_machine_cls(name): function init_registry (line 28) | def init_registry(): function load_modules (line 35) | def load_modules(modules: Optional[List[str]] = None) -> None: FILE: statemachine/signature.py function _make_key (line 19) | def _make_key(method): function signature_cache (line 36) | def signature_cache(user_function): class SignatureAdapter (line 55) | class SignatureAdapter(Signature): method __init__ (line 59) | def __init__(self, *args, **kwargs): method from_callable (line 65) | def from_callable(cls, method): method bind_expected (line 78) | def bind_expected(self, *args: Any, **kwargs: Any) -> BoundArguments: method _fast_bind (line 88) | def _fast_bind( method _full_bind (line 122) | def _full_bind( # noqa: C901 FILE: statemachine/spec_parser.py function _unique_key (line 23) | def _unique_key(left, right, operator) -> str: function replace_operators (line 29) | def replace_operators(expr: str) -> str: function custom_not (line 37) | def custom_not(predicate: Callable) -> Callable: function custom_and (line 54) | def custom_and(left: Callable, right: Callable) -> Callable: function custom_or (line 81) | def custom_or(left: Callable, right: Callable) -> Callable: function build_constant (line 108) | def build_constant(constant) -> Callable: class Functions (line 117) | class Functions: method register (line 121) | def register(cls, id) -> Callable: method get (line 129) | def get(cls, func_id): class InState (line 136) | class InState: method __init__ (line 137) | def __init__(self, machine): method __call__ (line 140) | def __call__(self, *state_ids: str): function build_in_call (line 145) | def build_in_call(*state_ids: str) -> Callable: function build_custom_operator (line 157) | def build_custom_operator(operator) -> Callable: function build_expression (line 181) | def build_expression(node, variable_hook, operator_mapping): # noqa: C901 function parse_boolean_expr (line 222) | def parse_boolean_expr(expr, variable_hook, operator_mapping): FILE: statemachine/state.py class _TransitionBuilder (line 24) | class _TransitionBuilder: method __init__ (line 25) | def __init__(self, state: "State"): method itself (line 28) | def itself(self, **kwargs): method __call__ (line 31) | def __call__(self, *states: "State", **kwargs): class _ToState (line 35) | class _ToState(_TransitionBuilder): method __call__ (line 36) | def __call__(self, *states: "State | NestedStateFactory | None", **kwa... class _FromState (line 44) | class _FromState(_TransitionBuilder): method any (line 45) | def any(self, **kwargs): method __call__ (line 49) | def __call__(self, *states: "State | NestedStateFactory", **kwargs): class NestedStateFactory (line 59) | class NestedStateFactory(type): method __new__ (line 60) | def __new__( # type: ignore [misc] method to (line 94) | def to(cls, *args: "State | NestedStateFactory", **kwargs) -> "_ToStat... method from_ (line 102) | def from_( # pragma: no cover class State (line 112) | class State: class Compound (line 197) | class Compound(metaclass=NestedStateFactory): class Parallel (line 200) | class Parallel(metaclass=NestedStateFactory, parallel=True): method __init__ (line 203) | def __init__( method _init_states (line 249) | def _init_states(self): method __eq__ (line 259) | def __eq__(self, other): method __hash__ (line 267) | def __hash__(self): method _setup (line 270) | def _setup(self): method _on_event_defined (line 280) | def _on_event_defined(self, event: str, transition: Transition, states... method __repr__ (line 286) | def __repr__(self): method __str__ (line 292) | def __str__(self): method id (line 296) | def id(self) -> str: method _set_id (line 299) | def _set_id(self, id: str) -> "State": method to (line 310) | def to(self) -> _ToState: method from_ (line 315) | def from_(self) -> _FromState: method initial (line 320) | def initial(self): method final (line 324) | def final(self): method parallel (line 328) | def parallel(self): method is_compound (line 332) | def is_compound(self): method is_history (line 336) | def is_history(self): method ancestors (line 339) | def ancestors(self, parent: "State | None" = None) -> Generator["State... method is_descendant (line 347) | def is_descendant(self, state: "State") -> bool: class InstanceState (line 351) | class InstanceState(State): method __init__ (line 359) | def __init__( method __getattr__ (line 369) | def __getattr__(self, name: str): method __eq__ (line 374) | def __eq__(self, other): method __hash__ (line 377) | def __hash__(self): method __repr__ (line 380) | def __repr__(self): method id (line 384) | def id(self) -> str: method initial (line 388) | def initial(self): method final (line 392) | def final(self): method parallel (line 396) | def parallel(self): method is_active (line 400) | def is_active(self): class AnyState (line 406) | class AnyState(State): method _on_event_defined (line 413) | def _on_event_defined(self, event: str, transition: Transition, states... class HistoryType (line 422) | class HistoryType(str, Enum): method is_deep (line 434) | def is_deep(self) -> bool: class HistoryState (line 438) | class HistoryState(State): method __init__ (line 439) | def __init__( FILE: statemachine/statemachine.py class StateChart (line 46) | class StateChart(Generic[TModel], metaclass=StateMachineMetaclass): method __init__ (line 139) | def __init__( method _get_engine (line 173) | def _get_engine(self): method _resolve_class_listeners (line 179) | def _resolve_class_listeners(self, **kwargs: Any) -> List[object]: method _build_configuration (line 199) | def _build_configuration(self) -> Configuration: method activate_initial_state (line 215) | def activate_initial_state(self) -> Any: method _processing_loop (line 221) | def _processing_loop(self, caller_future: "Any | None" = None) -> Any: method __setattr__ (line 227) | def __setattr__(self, name, value): method __repr__ (line 235) | def __repr__(self): method __format__ (line 242) | def __format__(self, fmt: str) -> str: method __getstate__ (line 247) | def __getstate__(self): method __setstate__ (line 254) | def __setstate__(self, state: Dict[str, Any]) -> None: method _get_initial_configuration (line 269) | def _get_initial_configuration(self): method bind_events_to (line 280) | def bind_events_to(self, *targets): method _add_listener (line 295) | def _add_listener(self, listeners: "Listeners", allowed_references: Sp... method _register_callbacks (line 307) | def _register_callbacks(self, listeners: List[object]): method active_listeners (line 331) | def active_listeners(self) -> List[object]: method add_listener (line 339) | def add_listener(self, *listeners): method _repr_html_ (line 355) | def _repr_html_(self): method _repr_svg_ (line 358) | def _repr_svg_(self): method _graph (line 361) | def _graph(self): method configuration_values (line 367) | def configuration_values(self) -> OrderedSet[Any]: method configuration (line 373) | def configuration(self) -> OrderedSet["State"]: method configuration (line 378) | def configuration(self, new_configuration: OrderedSet["State"]): method current_state_value (line 382) | def current_state_value(self): method current_state_value (line 391) | def current_state_value(self, value): method current_state (line 395) | def current_state(self) -> "State | MutableSet[State]": method current_state (line 409) | def current_state(self, value): # pragma: no cover method events (line 413) | def events(self) -> "List[Event]": method allowed_events (line 417) | def allowed_events(self) -> "List[Event]": method enabled_events (line 425) | def enabled_events(self, *args, **kwargs) -> Any: method _put_nonblocking (line 443) | def _put_nonblocking(self, trigger_data: TriggerData, internal: bool =... method send (line 447) | def send( method raise_ (line 482) | def raise_( method cancel_event (line 497) | def cancel_event(self, send_id: str): method is_terminated (line 502) | def is_terminated(self): class StateMachine (line 512) | class StateMachine(StateChart): FILE: statemachine/states.py class States (line 11) | class States: method __init__ (line 38) | def __init__(self, states: "Dict[str, State] | None" = None) -> None: method __repr__ (line 50) | def __repr__(self): method __eq__ (line 53) | def __eq__(self, other): method __getattr__ (line 56) | def __getattr__(self, name: str) -> "State": method __len__ (line 61) | def __len__(self): method __getitem__ (line 64) | def __getitem__(self, index): method __iter__ (line 67) | def __iter__(self): method append (line 70) | def append(self, state): method items (line 73) | def items(self): method from_enum (line 86) | def from_enum(cls, enum_type: EnumType, initial, final=None, use_enum_... FILE: statemachine/transition.py class Transition (line 16) | class Transition: method __init__ (line 43) | def __init__( method target (line 102) | def target(self) -> "State | None": method targets (line 107) | def targets(self) -> "List[State]": method __repr__ (line 111) | def __repr__(self): method __str__ (line 117) | def __str__(self): method _setup (line 120) | def _setup(self): method match (line 155) | def match(self, event: str): method event (line 159) | def event(self): method events (line 163) | def events(self): method add_event (line 166) | def add_event(self, value): method _copy_with_args (line 169) | def _copy_with_args(self, **kwargs): method is_eventless (line 184) | def is_eventless(self): FILE: statemachine/transition_list.py class TransitionList (line 15) | class TransitionList(AddCallbacksMixin): method __init__ (line 18) | def __init__(self, transitions: "Iterable[Transition] | None" = None): method __repr__ (line 27) | def __repr__(self): method __or__ (line 31) | def __or__(self, other: "TransitionList | Iterable"): method _on_event_defined (line 45) | def _on_event_defined(self, event: str, states: List["State"]): method add_transitions (line 51) | def add_transitions(self, transition: "Transition | TransitionList | I... method __getitem__ (line 70) | def __getitem__(self, index: int) -> "Transition": method __len__ (line 81) | def __len__(self): method __iter__ (line 89) | def __iter__(self): method _add_callback (line 92) | def _add_callback(self, callback, grouper: CallbackGroup, is_event=Fal... method add_event (line 103) | def add_event(self, event: str): method unique_events (line 114) | def unique_events(self) -> List["Event"]: method has_eventless_transition (line 130) | def has_eventless_transition(self): FILE: statemachine/transition_mixin.py class AddCallbacksMixin (line 11) | class AddCallbacksMixin: method _add_callback (line 12) | def _add_callback(self, callback: T, grouper: CallbackGroup, is_event=... method __call__ (line 15) | def __call__(self, *args, **kwargs) -> Any: method before (line 24) | def before(self, f: Callable): method after (line 36) | def after(self, f: Callable): method on (line 48) | def on(self, f: Callable): method cond (line 60) | def cond(self, f: Callable): method unless (line 72) | def unless(self, f: Callable): method validators (line 84) | def validators(self, f: Callable): FILE: statemachine/utils.py function qualname (line 12) | def qualname(cls): function ensure_iterable (line 19) | def ensure_iterable(obj): function humanize_id (line 32) | def humanize_id(id: str) -> str: function run_async_from_sync (line 47) | def run_async_from_sync(coroutine: "Any") -> "Any": FILE: tests/conftest.py function pytest_addoption (line 9) | def pytest_addoption(parser): function current_time (line 19) | def current_time(): function campaign_machine (line 24) | def campaign_machine(): function campaign_machine_with_validator (line 31) | def campaign_machine_with_validator(): function campaign_machine_with_final_state (line 40) | def campaign_machine_with_final_state(): function campaign_machine_with_values (line 47) | def campaign_machine_with_values(): function traffic_light_machine (line 54) | def traffic_light_machine(): function OrderControl (line 61) | def OrderControl(): function AllActionsMachine (line 68) | def AllActionsMachine(): function classic_traffic_light_machine (line 75) | def classic_traffic_light_machine(engine): function classic_traffic_light_machine_allow_event (line 95) | def classic_traffic_light_machine_allow_event(classic_traffic_light_mach... function reverse_traffic_light_machine (line 101) | def reverse_traffic_light_machine(): function approval_machine (line 108) | def approval_machine(current_time): # noqa: C901 function engine (line 151) | def engine(request): class _AsyncListener (line 161) | class _AsyncListener: method on_enter_state (line 164) | async def on_enter_state( class SMRunner (line 169) | class SMRunner: method __init__ (line 180) | def __init__(self, is_async: bool): method start (line 183) | async def start(self, cls, **kwargs): method send (line 198) | async def send(self, sm, event, **kwargs): method processing_loop (line 207) | async def processing_loop(self, sm): method sleep (line 216) | async def sleep(self, seconds: float): function sm_runner (line 225) | def sm_runner(request): function _check_leaked_threads (line 231) | def _check_leaked_threads(): FILE: tests/django_project/app.py function home (line 5) | def home(request): FILE: tests/django_project/manage.py function main (line 8) | def main(): FILE: tests/django_project/workflow/apps.py class WorfklowConfig (line 4) | class WorfklowConfig(AppConfig): FILE: tests/django_project/workflow/models.py class WorkflowSteps (line 8) | class WorkflowSteps(models.TextChoices): class Workflow (line 13) | class Workflow(models.Model, MachineMixin): FILE: tests/django_project/workflow/statemachines.py class WorfklowStateMachine (line 8) | class WorfklowStateMachine(StateChart): method has_user (line 16) | def has_user(self): FILE: tests/django_project/workflow/tests.py function Workflow (line 13) | def Workflow(): function User (line 20) | def User(): function one (line 27) | def one(Workflow): class TestWorkflow (line 31) | class TestWorkflow: method test_one (line 32) | def test_one(self, one): method test_two (line 36) | def test_two(self, one): method test_async_with_db_operation (line 43) | def test_async_with_db_operation(self, one, User, Workflow): method test_should_publish (line 59) | def test_should_publish(self, one): FILE: tests/examples/ai_shell_machine.py class Spinner (line 154) | class Spinner: method __init__ (line 157) | def __init__(self): method __enter__ (line 161) | def __enter__(self): method __exit__ (line 167) | def __exit__(self, *args): method _run (line 172) | def _run(self): function _tool_read_file (line 194) | def _tool_read_file(input_data: dict) -> str: function _tool_list_files (line 206) | def _tool_list_files(input_data: dict) -> str: function _tool_run_command (line 215) | def _tool_run_command(input_data: dict) -> str: function _tool_sm_configuration (line 251) | def _tool_sm_configuration(sm, input_data: dict) -> str: function _tool_sm_enabled_events (line 256) | def _tool_sm_enabled_events(sm, input_data: dict) -> str: function _tool_sm_macrostep_count (line 261) | def _tool_sm_macrostep_count(sm, input_data: dict) -> str: function _tool_sm_states (line 265) | def _tool_sm_states(sm, input_data: dict) -> str: function execute_tool (line 325) | def execute_tool(name: str, input_data: dict, sm=None) -> str: class AIShell (line 342) | class AIShell(StateChart): class session (line 374) | class session(State.Parallel): class conversation (line 375) | class conversation(State.Compound): class processing (line 378) | class processing(State.Compound): class context_tracker (line 406) | class context_tracker(State.Compound): method __init__ (line 423) | def __init__(self): method is_goodbye (line 435) | def is_goodbye(self, text="", **kwargs) -> bool: method is_not_goodbye (line 438) | def is_not_goodbye(self, text="", **kwargs) -> bool: method can_retry (line 441) | def can_retry(self, **kwargs) -> bool: method cannot_retry (line 444) | def cannot_retry(self, **kwargs) -> bool: method is_active_context (line 447) | def is_active_context(self, **kwargs) -> bool: method is_deep_context (line 450) | def is_deep_context(self, **kwargs) -> bool: method on_user_message (line 455) | def on_user_message(self, text, **kwargs): method has_tool_calls (line 459) | def has_tool_calls(self, data=None, **kwargs) -> bool: method on_invoke_thinking (line 463) | def on_invoke_thinking(self, **kwargs): method on_invoke_using_tool (line 480) | def on_invoke_using_tool(self, data, **kwargs): method on_enter_responding (line 494) | def on_enter_responding(self, **kwargs): method on_enter_idle (line 500) | def on_enter_idle(self, **kwargs): method on_enter_recovering (line 505) | def on_enter_recovering(self, **kwargs): method on_enter_deep (line 513) | def on_enter_deep(self, **kwargs): method on_enter_conversation_ended (line 517) | def on_enter_conversation_ended(self, **kwargs): function _check_openai (line 526) | def _check_openai(): function main (line 536) | def main(): FILE: tests/examples/air_conditioner_machine.py function sensor_temperature_reader (line 17) | def sensor_temperature_reader(seed: int, lower: int = 15, higher: int = ... class AirConditioner (line 24) | class AirConditioner(StateChart): method is_hot (line 39) | async def is_hot(self, temperature: int): method is_good (line 42) | async def is_good(self, temperature: int): method is_cool (line 45) | async def is_cool(self, temperature: int): method after_transition (line 48) | async def after_transition(self, event: str, source: State, target: St... function main (line 56) | async def main(): FILE: tests/examples/all_actions_machine.py class AllActionsMachine (line 15) | class AllActionsMachine(StateChart): method __init__ (line 29) | def __init__(self, *args, **kwargs): method validation_1 (line 35) | def validation_1(self): method validation_2 (line 39) | def validation_2(self): method condition_1 (line 43) | def condition_1(self): method condition_2 (line 47) | def condition_2(self): method unless_1 (line 51) | def unless_1(self): method unless_2 (line 55) | def unless_2(self): method on_enter_state (line 61) | def on_enter_state(self): method on_exit_state (line 64) | def on_exit_state(self): method before_transition (line 69) | def before_transition(self): method on_transition (line 72) | def on_transition(self): method after_transition (line 75) | def after_transition(self): method before_go_decor (line 81) | def before_go_decor(self): method before_go_inline_1 (line 84) | def before_go_inline_1(self): method before_go_inline_2 (line 87) | def before_go_inline_2(self): method before_go (line 90) | def before_go(self): method go_on_decor (line 94) | def go_on_decor(self): method on_inline_1 (line 97) | def on_inline_1(self): method on_inline_2 (line 100) | def on_inline_2(self): method on_go (line 103) | def on_go(self): method after_go_decor (line 107) | def after_go_decor(self): method after_go_inline_1 (line 110) | def after_go_inline_1(self): method after_go_inline_2 (line 113) | def after_go_inline_2(self): method after_go (line 116) | def after_go(self): method enter_initial_decor (line 122) | def enter_initial_decor(self): method on_enter_initial (line 125) | def on_enter_initial(self): method exit_initial_decor (line 129) | def exit_initial_decor(self): method on_exit_initial (line 132) | def on_exit_initial(self): method on_enter_final (line 135) | def on_enter_final(self): method on_exit_final (line 138) | def on_exit_final(self): FILE: tests/examples/async_guess_the_number_machine.py class GuessTheNumberMachine (line 29) | class GuessTheNumberMachine(StateChart): method __init__ (line 68) | def __init__(self, writer, max_attempts=5, lower=1, higher=5, seed=42): method max_guesses_reached (line 80) | async def max_guesses_reached(self): method before_guess (line 83) | async def before_guess(self, number): method guess_is_lower (line 87) | async def guess_is_lower(self, number): method guess_is_higher (line 90) | async def guess_is_higher(self, number): method guess_is_equal (line 93) | async def guess_is_equal(self, number): method on_enter_start (line 96) | async def on_enter_start(self): method on_enter_low (line 102) | async def on_enter_low(self): method on_enter_high (line 105) | async def on_enter_high(self): method on_enter_won (line 108) | async def on_enter_won(self): method on_enter_lose (line 111) | async def on_enter_lose(self): function connect_stdin_stdout (line 122) | async def connect_stdin_stdout(): function main_async (line 146) | async def main_async(): function main_sync (line 161) | def main_sync(): FILE: tests/examples/async_without_loop_machine.py class AsyncStateMachine (line 14) | class AsyncStateMachine(StateChart): method on_start (line 22) | async def on_start(self): method on_finish (line 25) | async def on_finish(self): function sync_main (line 34) | def sync_main(): FILE: tests/examples/enum_campaign_machine.py class CampaignStatus (line 17) | class CampaignStatus(Enum): class CampaignMachine (line 23) | class CampaignMachine(StateChart): FILE: tests/examples/guess_the_number_machine.py class GuessTheNumberMachine (line 17) | class GuessTheNumberMachine(StateChart): method __init__ (line 32) | def __init__(self, max_attempts=5, lower=1, higher=5, seed=42): method max_guesses_reached (line 43) | def max_guesses_reached(self): method before_guess (line 46) | def before_guess(self, number): method guess_is_lower (line 50) | def guess_is_lower(self, number): method guess_is_higher (line 53) | def guess_is_higher(self, number): method guess_is_equal (line 56) | def guess_is_equal(self, number): method on_enter_start (line 59) | def on_enter_start(self): method on_enter_low (line 66) | def on_enter_low(self): method on_enter_high (line 69) | def on_enter_high(self): method on_enter_won (line 72) | def on_enter_won(self): method on_enter_lose (line 75) | def on_enter_lose(self): FILE: tests/examples/lor_machine.py class LordOfTheRingsQuestStateMachine (line 15) | class LordOfTheRingsQuestStateMachine(StateChart): FILE: tests/examples/order_control_machine.py class OrderControl (line 13) | class OrderControl(StateChart): method __init__ (line 28) | def __init__(self): method payments_enough (line 34) | def payments_enough(self, amount): method before_add_to_order (line 37) | def before_add_to_order(self, amount): method before_receive_payment (line 41) | def before_receive_payment(self, amount): method after_receive_payment (line 45) | def after_receive_payment(self): method on_enter_waiting_for_payment (line 48) | def on_enter_waiting_for_payment(self): FILE: tests/examples/order_control_rich_model_machine.py class Order (line 15) | class Order: method __init__ (line 16) | def __init__(self): method payments_enough (line 21) | def payments_enough(self, amount): method before_add_to_order (line 24) | def before_add_to_order(self, amount): method on_receive_payment (line 28) | def on_receive_payment(self, amount): method after_receive_payment (line 32) | def after_receive_payment(self): method wait_for_payment (line 35) | def wait_for_payment(self): class OrderControl (line 39) | class OrderControl(StateChart): FILE: tests/examples/persistent_model_machine.py class ResourceManagement (line 28) | class ResourceManagement(StateChart): class AbstractPersistentModel (line 47) | class AbstractPersistentModel(ABC): method __init__ (line 56) | def __init__(self): method __repr__ (line 59) | def __repr__(self): method state (line 63) | def state(self): method state (line 69) | def state(self, value): method _read_state (line 74) | def _read_state(self): ... method _write_state (line 77) | def _write_state(self, value): ... class FilePersistentModel (line 88) | class FilePersistentModel(AbstractPersistentModel): method __init__ (line 93) | def __init__(self, file): method _read_state (line 97) | def _read_state(self): method _write_state (line 102) | def _write_state(self, value): FILE: tests/examples/recursive_event_machine.py class MyStateMachine (line 15) | class MyStateMachine(StateChart): method on_enter_state (line 24) | def on_enter_state(self, target, event): FILE: tests/examples/reusing_transitions_machine.py class TrafficLightMachine (line 29) | class TrafficLightMachine(StateChart): method before_slowdown (line 42) | def before_slowdown(self): method before_cycle (line 45) | def before_cycle(self, event: str, source: State, target: State, messa... method on_enter_red (line 49) | def on_enter_red(self): method on_exit_red (line 52) | def on_exit_red(self): class TrafficLightIsolatedTransitions (line 66) | class TrafficLightIsolatedTransitions(StateChart): method before_slowdown (line 79) | def before_slowdown(self): method before_cycle (line 82) | def before_cycle(self, event: str, source: State, target: State, messa... method on_enter_red (line 86) | def on_enter_red(self): method on_exit_red (line 89) | def on_exit_red(self): FILE: tests/examples/sqlite_persistent_model_machine.py class WorkflowDB (line 50) | class WorkflowDB: method __init__ (line 53) | def __init__(self): method insert_document (line 73) | def insert_document(self, title, author): method find_document (line 81) | def find_document(self, doc_id): method get_state (line 87) | def get_state(self, doc_id): method set_state (line 97) | def set_state(self, doc_id, value): method all_documents (line 117) | def all_documents(self): method history_for (line 123) | def history_for(self, doc_id): method mutation_count (line 130) | def mutation_count(self): method close (line 134) | def close(self): class Document (line 154) | class Document: method __init__ (line 157) | def __init__(self, store, doc_id, title, author): method create (line 165) | def create(cls, store, workflow_cls, title, author): method load (line 173) | def load(cls, store, workflow_cls, doc_id): method state (line 181) | def state(self): method state (line 185) | def state(self, value): method __repr__ (line 188) | def __repr__(self): class ApprovalWorkflow (line 204) | class ApprovalWorkflow(StateChart): class review (line 209) | class review(State.Parallel): class legal_track (line 210) | class legal_track(State.Compound): class tech_track (line 216) | class tech_track(State.Compound): function print_table (line 249) | def print_table(headers, rows): class ApprovalWorkflowAtomic (line 356) | class ApprovalWorkflowAtomic(ApprovalWorkflow): FILE: tests/examples/statechart_cleanup_machine.py class ResourceManager (line 24) | class ResourceManager(StateChart): method __init__ (line 47) | def __init__(self, job=None): method on_enter_working (line 51) | def on_enter_working(self): method after_start (line 58) | def after_start(self): method on_enter_recovering (line 63) | def on_enter_recovering(self, error=None, **kwargs): method on_enter_idle (line 67) | def on_enter_idle(self): function good_job (line 79) | def good_job(): function bad_job (line 101) | def bad_job(): FILE: tests/examples/statechart_compound_machine.py class QuestMachine (line 18) | class QuestMachine(StateChart): class shire (line 25) | class shire(State.Compound): class rivendell (line 31) | class rivendell(State.Compound): FILE: tests/examples/statechart_delayed_machine.py class BeaconsMachine (line 53) | class BeaconsMachine(StateChart): class quest (line 72) | class quest(State.Parallel): class beacons (line 73) | class beacons(State.Compound): class siege (line 93) | class siege(State.Compound): method on_enter_minas_tirith (line 111) | def on_enter_minas_tirith(self): method after_light_next (line 116) | def after_light_next(self, target): method on_enter_holding (line 124) | def on_enter_holding(self): method on_enter_rohan_rides (line 128) | def on_enter_rohan_rides(self): method on_enter_city_falls (line 132) | def on_enter_city_falls(self): class FailedBeaconsMachine (line 175) | class FailedBeaconsMachine(BeaconsMachine): method on_enter_minas_tirith (line 180) | def on_enter_minas_tirith(self): FILE: tests/examples/statechart_error_handling_machine.py class QuestRecoveryMachine (line 24) | class QuestRecoveryMachine(StateChart): method on_enter_danger_zone (line 46) | def on_enter_danger_zone(self): method on_enter_recovering (line 50) | def on_enter_recovering(self, error=None, **kwargs): class QuestNoCatch (line 88) | class QuestNoCatch(StateChart): method on_enter_danger_zone (line 96) | def on_enter_danger_zone(self): FILE: tests/examples/statechart_eventless_machine.py class RingCorruptionMachine (line 19) | class RingCorruptionMachine(StateChart): method is_tempted (line 50) | def is_tempted(self): method is_corrupted (line 53) | def is_corrupted(self): method is_lost (line 56) | def is_lost(self): FILE: tests/examples/statechart_history_machine.py class PersonalityMachine (line 20) | class PersonalityMachine(StateChart): class personality (line 28) | class personality(State.Compound): class DeepPersonalityMachine (line 87) | class DeepPersonalityMachine(StateChart): class realm (line 90) | class realm(State.Compound): class inner (line 91) | class inner(State.Compound): FILE: tests/examples/statechart_in_condition_machine.py class FellowshipMachine (line 18) | class FellowshipMachine(StateChart): class quest (line 26) | class quest(State.Parallel): class frodo_path (line 27) | class frodo_path(State.Compound): class sam_path (line 35) | class sam_path(State.Compound): FILE: tests/examples/statechart_parallel_machine.py class WarMachine (line 17) | class WarMachine(StateChart): class war (line 25) | class war(State.Parallel): class frodos_quest (line 26) | class frodos_quest(State.Compound): class aragorns_path (line 34) | class aragorns_path(State.Compound): class gandalfs_defense (line 40) | class gandalfs_defense(State.Compound): FILE: tests/examples/traffic_light_machine.py class TrafficLightMachine (line 21) | class TrafficLightMachine(StateChart): method before_cycle (line 30) | def before_cycle(self, event: str, source: State, target: State): class Supervisor (line 38) | class Supervisor: method __init__ (line 39) | def __init__(self, sm: StateChart, sm_event: str): method run (line 44) | def run(self): method stop (line 49) | def stop(self): function main (line 53) | def main(): FILE: tests/examples/user_machine.py class UserStatus (line 23) | class UserStatus(str, Enum): class UserExperience (line 32) | class UserExperience(str, Enum): class User (line 38) | class User: method __post_init__ (line 46) | def __post_init__(self): class MachineChangeListenter (line 58) | class MachineChangeListenter: method before_transition (line 59) | def before_transition(self, event: str, state: State): method on_enter_state (line 62) | def on_enter_state(self, state: State, event: str): class UserStatusMachine (line 66) | class UserStatusMachine(StateChart): method on_signup (line 89) | def on_signup(self, token: str): class UserExperienceMachine (line 95) | class UserExperienceMachine(StateChart): function main (line 109) | def main(): # type: ignore[attr-defined] FILE: tests/examples/weighted_idle_machine.py class WeightedIdleMachine (line 19) | class WeightedIdleMachine(StateChart): FILE: tests/helpers.py function import_module_by_path (line 5) | def import_module_by_path(src_file: Path): FILE: tests/machines/compound/middle_earth_journey.py class MiddleEarthJourney (line 5) | class MiddleEarthJourney(StateChart): class rivendell (line 6) | class rivendell(State.Compound): class moria (line 12) | class moria(State.Compound): class lothlorien (line 18) | class lothlorien(State.Compound): FILE: tests/machines/compound/middle_earth_journey_two_compounds.py class MiddleEarthJourneyTwoCompounds (line 5) | class MiddleEarthJourneyTwoCompounds(StateChart): class rivendell (line 6) | class rivendell(State.Compound): class moria (line 12) | class moria(State.Compound): FILE: tests/machines/compound/middle_earth_journey_with_finals.py class MiddleEarthJourneyWithFinals (line 5) | class MiddleEarthJourneyWithFinals(StateChart): class rivendell (line 6) | class rivendell(State.Compound): class moria (line 12) | class moria(State.Compound): class lothlorien (line 18) | class lothlorien(State.Compound): FILE: tests/machines/compound/moria_expedition.py class MoriaExpedition (line 5) | class MoriaExpedition(StateChart): class moria (line 6) | class moria(State.Compound): class upper_halls (line 7) | class upper_halls(State.Compound): FILE: tests/machines/compound/moria_expedition_with_escape.py class MoriaExpeditionWithEscape (line 5) | class MoriaExpeditionWithEscape(StateChart): class moria (line 6) | class moria(State.Compound): class upper_halls (line 7) | class upper_halls(State.Compound): FILE: tests/machines/compound/quest_for_erebor.py class QuestForErebor (line 5) | class QuestForErebor(StateChart): class lonely_mountain (line 6) | class lonely_mountain(State.Compound): FILE: tests/machines/compound/shire_to_rivendell.py class ShireToRivendell (line 5) | class ShireToRivendell(StateChart): class shire (line 6) | class shire(State.Compound): FILE: tests/machines/donedata/destroy_the_ring.py class DestroyTheRing (line 6) | class DestroyTheRing(StateChart): class quest (line 7) | class quest(State.Compound): method get_quest_result (line 13) | def get_quest_result(self): method capture_result (line 19) | def capture_result(self, ring_destroyed=None, hero=None, **kwargs): FILE: tests/machines/donedata/destroy_the_ring_simple.py class DestroyTheRingSimple (line 6) | class DestroyTheRingSimple(StateChart): class quest (line 7) | class quest(State.Compound): method get_result (line 13) | def get_result(self): FILE: tests/machines/donedata/nested_quest_donedata.py class NestedQuestDoneData (line 6) | class NestedQuestDoneData(StateChart): class outer (line 7) | class outer(State.Compound): class inner (line 8) | class inner(State.Compound): method inner_result (line 14) | def inner_result(self): FILE: tests/machines/donedata/quest_for_erebor_done_convention.py class QuestForEreborDoneConvention (line 5) | class QuestForEreborDoneConvention(StateChart): class quest (line 6) | class quest(State.Compound): FILE: tests/machines/donedata/quest_for_erebor_explicit_id.py class QuestForEreborExplicitId (line 6) | class QuestForEreborExplicitId(StateChart): class quest (line 7) | class quest(State.Compound): FILE: tests/machines/donedata/quest_for_erebor_multi_word.py class QuestForEreborMultiWord (line 5) | class QuestForEreborMultiWord(StateChart): class lonely_mountain (line 6) | class lonely_mountain(State.Compound): FILE: tests/machines/donedata/quest_for_erebor_with_event.py class QuestForEreborWithEvent (line 6) | class QuestForEreborWithEvent(StateChart): class quest (line 7) | class quest(State.Compound): FILE: tests/machines/error/error_convention_event.py class ErrorConventionEventSC (line 6) | class ErrorConventionEventSC(StateChart): method bad_action (line 15) | def bad_action(self): FILE: tests/machines/error/error_convention_transition_list.py class ErrorConventionTransitionListSC (line 5) | class ErrorConventionTransitionListSC(StateChart): method bad_action (line 14) | def bad_action(self): FILE: tests/machines/error/error_in_action_sc.py class ErrorInActionSC (line 6) | class ErrorInActionSC(StateChart): method bad_action (line 14) | def bad_action(self): FILE: tests/machines/error/error_in_action_sm_with_flag.py class ErrorInActionSMWithFlag (line 6) | class ErrorInActionSMWithFlag(StateChart): method bad_action (line 16) | def bad_action(self): FILE: tests/machines/error/error_in_after_sc.py class ErrorInAfterSC (line 6) | class ErrorInAfterSC(StateChart): method bad_after (line 14) | def bad_after(self): FILE: tests/machines/error/error_in_error_handler_sc.py class ErrorInErrorHandlerSC (line 6) | class ErrorInErrorHandlerSC(StateChart): method bad_action (line 20) | def bad_action(self): method bad_error_handler (line 23) | def bad_error_handler(self): FILE: tests/machines/error/error_in_guard_sc.py class ErrorInGuardSC (line 6) | class ErrorInGuardSC(StateChart): method bad_guard (line 13) | def bad_guard(self): FILE: tests/machines/error/error_in_guard_sm.py class ErrorInGuardSM (line 5) | class ErrorInGuardSM(StateChart): method bad_guard (line 14) | def bad_guard(self): FILE: tests/machines/error/error_in_on_enter_sc.py class ErrorInOnEnterSC (line 6) | class ErrorInOnEnterSC(StateChart): method on_enter_s2 (line 14) | def on_enter_s2(self): FILE: tests/machines/eventless/auto_advance.py class AutoAdvance (line 5) | class AutoAdvance(StateChart): class journey (line 6) | class journey(State.Compound): FILE: tests/machines/eventless/beacon_chain.py class BeaconChain (line 5) | class BeaconChain(StateChart): class beacons (line 6) | class beacons(State.Compound): FILE: tests/machines/eventless/beacon_chain_lighting.py class BeaconChainLighting (line 5) | class BeaconChainLighting(StateChart): class chain (line 6) | class chain(State.Compound): FILE: tests/machines/eventless/coordinated_advance.py class CoordinatedAdvance (line 5) | class CoordinatedAdvance(StateChart): class forces (line 6) | class forces(State.Parallel): class vanguard (line 7) | class vanguard(State.Compound): class rearguard (line 13) | class rearguard(State.Compound): FILE: tests/machines/eventless/ring_corruption.py class RingCorruption (line 5) | class RingCorruption(StateChart): method is_corrupted (line 14) | def is_corrupted(self): method increase_power (line 17) | def increase_power(self): FILE: tests/machines/eventless/ring_corruption_with_bear_ring.py class RingCorruptionWithBearRing (line 5) | class RingCorruptionWithBearRing(StateChart): method is_corrupted (line 14) | def is_corrupted(self): method increase_power (line 17) | def increase_power(self): FILE: tests/machines/eventless/ring_corruption_with_tick.py class RingCorruptionWithTick (line 5) | class RingCorruptionWithTick(StateChart): method is_corrupted (line 14) | def is_corrupted(self): FILE: tests/machines/history/deep_memory_of_moria.py class DeepMemoryOfMoria (line 6) | class DeepMemoryOfMoria(StateChart): class moria (line 7) | class moria(State.Compound): class halls (line 8) | class halls(State.Compound): FILE: tests/machines/history/gollum_personality.py class GollumPersonality (line 6) | class GollumPersonality(StateChart): class personality (line 7) | class personality(State.Compound): FILE: tests/machines/history/gollum_personality_default_gollum.py class GollumPersonalityDefaultGollum (line 6) | class GollumPersonalityDefaultGollum(StateChart): class personality (line 7) | class personality(State.Compound): FILE: tests/machines/history/gollum_personality_with_default.py class GollumPersonalityWithDefault (line 6) | class GollumPersonalityWithDefault(StateChart): class personality (line 7) | class personality(State.Compound): FILE: tests/machines/history/shallow_moria.py class ShallowMoria (line 6) | class ShallowMoria(StateChart): class moria (line 7) | class moria(State.Compound): class halls (line 8) | class halls(State.Compound): FILE: tests/machines/in_condition/combined_guard.py class CombinedGuard (line 5) | class CombinedGuard(StateChart): class positions (line 6) | class positions(State.Parallel): class scout (line 7) | class scout(State.Compound): class warrior (line 13) | class warrior(State.Compound): FILE: tests/machines/in_condition/descendant_check.py class DescendantCheck (line 5) | class DescendantCheck(StateChart): class realm (line 6) | class realm(State.Compound): FILE: tests/machines/in_condition/eventless_in.py class EventlessIn (line 5) | class EventlessIn(StateChart): class coordination (line 6) | class coordination(State.Parallel): class leader (line 7) | class leader(State.Compound): class follower (line 13) | class follower(State.Compound): FILE: tests/machines/in_condition/fellowship.py class Fellowship (line 5) | class Fellowship(StateChart): class positions (line 6) | class positions(State.Parallel): class frodo (line 7) | class frodo(State.Compound): class sam (line 13) | class sam(State.Compound): FILE: tests/machines/in_condition/fellowship_coordination.py class FellowshipCoordination (line 5) | class FellowshipCoordination(StateChart): class mission (line 6) | class mission(State.Parallel): class scouts (line 7) | class scouts(State.Compound): class army (line 13) | class army(State.Compound): FILE: tests/machines/in_condition/gate_of_moria.py class GateOfMoria (line 5) | class GateOfMoria(StateChart): FILE: tests/machines/parallel/session.py class Session (line 5) | class Session(StateChart): class session (line 6) | class session(State.Parallel): class ui (line 7) | class ui(State.Compound): class backend (line 13) | class backend(State.Compound): FILE: tests/machines/parallel/session_with_done_state.py class SessionWithDoneState (line 5) | class SessionWithDoneState(StateChart): class session (line 6) | class session(State.Parallel): class ui (line 7) | class ui(State.Compound): class backend (line 13) | class backend(State.Compound): FILE: tests/machines/parallel/two_towers.py class TwoTowers (line 5) | class TwoTowers(StateChart): class battle (line 6) | class battle(State.Parallel): class helms_deep (line 7) | class helms_deep(State.Compound): class isengard (line 13) | class isengard(State.Compound): FILE: tests/machines/parallel/war_of_the_ring.py class WarOfTheRing (line 5) | class WarOfTheRing(StateChart): class war (line 6) | class war(State.Parallel): class frodos_quest (line 7) | class frodos_quest(State.Compound): class aragorns_path (line 15) | class aragorns_path(State.Compound): class gandalfs_defense (line 21) | class gandalfs_defense(State.Compound): FILE: tests/machines/parallel/war_with_exit.py class WarWithExit (line 5) | class WarWithExit(StateChart): class war (line 6) | class war(State.Parallel): class front_a (line 7) | class front_a(State.Compound): class front_b (line 13) | class front_b(State.Compound): FILE: tests/machines/showcase_actions.py class ActionsSC (line 5) | class ActionsSC(StateChart): method on_exit_off (line 13) | def on_exit_off(self): ... method on_enter_on (line 14) | def on_enter_on(self): ... method on_exit_on (line 15) | def on_exit_on(self): ... method on_enter_done (line 16) | def on_enter_done(self): ... FILE: tests/machines/showcase_compound.py class CompoundSC (line 5) | class CompoundSC(StateChart): class active (line 6) | class active(State.Compound, name="Active"): FILE: tests/machines/showcase_deep_history.py class DeepHistorySC (line 6) | class DeepHistorySC(StateChart): class outer (line 7) | class outer(State.Compound, name="Outer"): class inner (line 8) | class inner(State.Compound, name="Inner"): FILE: tests/machines/showcase_guards.py class GuardSC (line 5) | class GuardSC(StateChart): method is_valid (line 10) | def is_valid(self): method is_invalid (line 13) | def is_invalid(self): FILE: tests/machines/showcase_history.py class HistorySC (line 6) | class HistorySC(StateChart): class process (line 7) | class process(State.Compound, name="Process"): FILE: tests/machines/showcase_internal.py class InternalSC (line 5) | class InternalSC(StateChart): method log_status (line 9) | def log_status(self): ... FILE: tests/machines/showcase_parallel.py class ParallelSC (line 5) | class ParallelSC(StateChart): class both (line 6) | class both(State.Parallel, name="Both"): class left (line 7) | class left(State.Compound, name="Left"): class right (line 12) | class right(State.Compound, name="Right"): FILE: tests/machines/showcase_parallel_compound.py class ParallelCompoundSC (line 5) | class ParallelCompoundSC(StateChart): class pipeline (line 17) | class pipeline(State.Parallel, name="Pipeline"): class build (line 18) | class build(State.Compound, name="Build"): class test (line 23) | class test(State.Compound, name="Test"): FILE: tests/machines/showcase_self_transition.py class SelfTransitionSC (line 5) | class SelfTransitionSC(StateChart): FILE: tests/machines/showcase_simple.py class SimpleSC (line 5) | class SimpleSC(StateChart): FILE: tests/machines/transition_from_any.py class OrderWorkflow (line 5) | class OrderWorkflow(StateChart): class OrderWorkflowCompound (line 18) | class OrderWorkflowCompound(StateChart): class active (line 19) | class active(State.Compound): FILE: tests/machines/tutorial_coffee_order.py class CoffeeOrder (line 5) | class CoffeeOrder(StateChart): FILE: tests/machines/validators/multi_validator.py class MultiValidator (line 5) | class MultiValidator(StateChart): method check_a (line 13) | def check_a(self, **kwargs): method check_b (line 17) | def check_b(self, **kwargs): FILE: tests/machines/validators/order_validation.py class OrderValidation (line 5) | class OrderValidation(StateChart): method check_stock (line 15) | def check_stock(self, quantity=0, **kwargs): FILE: tests/machines/validators/order_validation_no_error_events.py class OrderValidationNoErrorEvents (line 5) | class OrderValidationNoErrorEvents(StateChart): method check_stock (line 17) | def check_stock(self, quantity=0, **kwargs): FILE: tests/machines/validators/validator_fallthrough.py class ValidatorFallthrough (line 5) | class ValidatorFallthrough(StateChart): method must_be_premium (line 18) | def must_be_premium(self, **kwargs): FILE: tests/machines/validators/validator_with_cond.py class ValidatorWithCond (line 5) | class ValidatorWithCond(StateChart): method check_auth (line 15) | def check_auth(self, token=None, **kwargs): FILE: tests/machines/validators/validator_with_error_transition.py class ValidatorWithErrorTransition (line 5) | class ValidatorWithErrorTransition(StateChart): method check_input (line 20) | def check_input(self, value=None, **kwargs): method risky_action (line 24) | def risky_action(self, **kwargs): FILE: tests/machines/workflow/campaign_machine.py class CampaignMachine (line 5) | class CampaignMachine(StateChart): FILE: tests/machines/workflow/campaign_machine_with_validator.py class CampaignMachineWithValidator (line 5) | class CampaignMachineWithValidator(StateChart): method can_produce (line 16) | def can_produce(*args, **kwargs): FILE: tests/machines/workflow/campaign_machine_with_values.py class CampaignMachineWithValues (line 5) | class CampaignMachineWithValues(StateChart): FILE: tests/machines/workflow/reverse_traffic_light.py class ReverseTrafficLightMachine (line 5) | class ReverseTrafficLightMachine(StateChart): FILE: tests/models.py class MyModel (line 1) | class MyModel: method __init__ (line 4) | def __init__(self, **kwargs): method __repr__ (line 9) | def __repr__(self): FILE: tests/scrape_images.py class MachineScraper (line 10) | class MachineScraper: method __init__ (line 15) | def __init__(self, project_root): method __repr__ (line 21) | def __repr__(self): method _get_module (line 24) | def _get_module(self, src_file): method generate_image (line 31) | def generate_image(self, sm_class, original_path): method __call__ (line 39) | def __call__(self, block, block_vars, gallery_conf): FILE: tests/scxml/conftest.py function should_generate_debug_diagram (line 44) | def should_generate_debug_diagram(request): function compute_testcase_marks (line 48) | def compute_testcase_marks(testcase_path: Path, is_async: bool) -> list[... function pytest_generate_tests (line 57) | def pytest_generate_tests(metafunc): FILE: tests/scxml/test_microwave.py function test_microwave_scxml (line 38) | def test_microwave_scxml(): class TestMicrowave (line 63) | class TestMicrowave: method microwave_cls (line 65) | def microwave_cls(self): method test_microwave (line 109) | def test_microwave(self, microwave_cls): FILE: tests/scxml/test_scxml_cases.py class AsyncListener (line 20) | class AsyncListener: method on_enter_state (line 23) | async def on_enter_state( function _run_scxml_testcase (line 28) | def _run_scxml_testcase( function _assert_passed (line 56) | def _assert_passed(sm: StateChart): function _wait_for_completion (line 61) | def _wait_for_completion(sm: StateChart, timeout_s: float = 5.0): function test_scxml_usecase_sync (line 70) | def test_scxml_usecase_sync(testcase_path: Path, should_generate_debug_d... function _async_wait_for_completion (line 80) | async def _async_wait_for_completion(sm: StateChart, timeout_s: float = ... function test_scxml_usecase_async (line 91) | async def test_scxml_usecase_async(testcase_path: Path, should_generate_... FILE: tests/test_actions.py class TestActions (line 5) | class TestActions: method test_should_return_all_before_results (line 6) | def test_should_return_all_before_results(self, AllActionsMachine): method test_should_allow_actions_on_the_model (line 9) | def test_should_allow_actions_on_the_model(self): method test_should_should_compute_callbacks_meta_list (line 13) | def test_should_should_compute_callbacks_meta_list(self, campaign_mach... FILE: tests/test_api_contract.py class Model (line 31) | class Model: method __init__ (line 34) | def __init__(self): class FlatSC (line 43) | class FlatSC(StateChart): class CompoundSC (line 52) | class CompoundSC(StateChart): class parent (line 53) | class parent(State.Compound): class ParallelSC (line 62) | class ParallelSC(StateChart): class regions (line 63) | class regions(State.Parallel): class region_a (line 64) | class region_a(State.Compound): class region_b (line 69) | class region_b(State.Compound): class ComplexParallelSC (line 75) | class ComplexParallelSC(StateChart): class top (line 76) | class top(State.Parallel): class left (line 77) | class left(State.Compound): class nested (line 78) | class nested(State.Compound): class right (line 86) | class right(State.Compound): function assert_contract (line 97) | def assert_contract(sm, model, expected_ids: set): function test_configuration_contract (line 206) | async def test_configuration_contract(sm_runner, sc_class, events, expec... function test_setter_contract (line 231) | async def test_setter_contract(sm_runner, sc_class, new_value, expected_... function test_set_none_clears_configuration (line 238) | async def test_set_none_clears_configuration(sm_runner): function test_uninitialized_then_activated (line 266) | async def test_uninitialized_then_activated(sc_class, expected_ids): FILE: tests/test_async.py function async_order_control_machine (line 12) | def async_order_control_machine(): # noqa: C901 function test_async_order_control_machine (line 54) | async def test_async_order_control_machine(async_order_control_machine): function test_async_state_from_sync_context (line 77) | def test_async_state_from_sync_context(async_order_control_machine): class AsyncConditionExpressionMachine (line 102) | class AsyncConditionExpressionMachine(StateChart): method cond_true (line 117) | async def cond_true(self): method cond_false (line 120) | async def cond_false(self): method on_enter_state (line 123) | async def on_enter_state(self, target): function test_async_condition_not (line 127) | async def test_async_condition_not(recwarn): function test_async_condition_not_blocked (line 136) | async def test_async_condition_not_blocked(): function test_async_condition_and (line 144) | async def test_async_condition_and(): function test_async_condition_and_blocked (line 152) | async def test_async_condition_and_blocked(): function test_async_condition_or_false_first (line 160) | async def test_async_condition_or_false_first(): function test_async_condition_or_true_first (line 168) | async def test_async_condition_or_true_first(): function test_async_condition_or_both_false (line 176) | async def test_async_condition_or_both_false(): function test_async_state_should_be_initialized (line 184) | async def test_async_state_should_be_initialized(async_order_control_mac... function test_async_catch_errors_as_events_in_condition (line 214) | async def test_async_catch_errors_as_events_in_condition(): function test_async_catch_errors_as_events_in_transition (line 234) | async def test_async_catch_errors_as_events_in_transition(): function test_async_catch_errors_as_events_in_after (line 257) | async def test_async_catch_errors_as_events_in_after(): function test_async_catch_errors_as_events_in_before (line 277) | async def test_async_catch_errors_as_events_in_before(): function test_async_invalid_definition_in_transition_propagates (line 300) | async def test_async_invalid_definition_in_transition_propagates(): function test_async_invalid_definition_in_after_propagates (line 318) | async def test_async_invalid_definition_in_after_propagates(): function test_async_runtime_error_in_after_without_catch_errors_as_events (line 336) | async def test_async_runtime_error_in_after_without_catch_errors_as_even... function test_async_engine_invalid_definition_in_condition_propagates (line 362) | async def test_async_engine_invalid_definition_in_condition_propagates(): function test_async_engine_invalid_definition_in_transition_propagates (line 381) | async def test_async_engine_invalid_definition_in_transition_propagates(): function test_async_engine_invalid_definition_in_after_propagates (line 400) | async def test_async_engine_invalid_definition_in_after_propagates(): function test_async_engine_runtime_error_in_after_without_catch_errors_as_events_propagates (line 419) | async def test_async_engine_runtime_error_in_after_without_catch_errors_... function test_async_engine_start_noop_when_already_initialized (line 440) | async def test_async_engine_start_noop_when_already_initialized(): class TestAsyncEnabledEvents (line 460) | class TestAsyncEnabledEvents: method test_passing_async_condition (line 461) | async def test_passing_async_condition(self): method test_failing_async_condition (line 475) | async def test_failing_async_condition(self): method test_kwargs_forwarded_to_async_conditions (line 489) | async def test_kwargs_forwarded_to_async_conditions(self): method test_async_condition_exception_treated_as_enabled (line 504) | async def test_async_condition_exception_treated_as_enabled(self): method test_duplicate_event_across_transitions_deduplicated (line 518) | async def test_duplicate_event_across_transitions_deduplicated(self): method test_mixed_enabled_and_disabled_async (line 540) | async def test_mixed_enabled_and_disabled_async(self): FILE: tests/test_async_futures.py class TrafficLight (line 24) | class TrafficLight(StateChart): method on_slow_down (line 33) | async def on_slow_down(self): method on_stop (line 36) | async def on_stop(self): method on_go (line 39) | async def on_go(self): class FailingMachine (line 43) | class FailingMachine(StateChart): method on_ok (line 51) | async def on_ok(self): method on_fail (line 54) | async def on_fail(self): class TestConcurrentSendsGetCorrectResults (line 63) | class TestConcurrentSendsGetCorrectResults: method test_sequential_sends (line 67) | async def test_sequential_sends(self): method test_single_async_caller_gets_result (line 79) | async def test_single_async_caller_gets_result(self): class TestExceptionRouting (line 88) | class TestExceptionRouting: method test_exception_reaches_caller (line 92) | async def test_exception_reaches_caller(self): class TestTransitionNotAllowedRouting (line 112) | class TestTransitionNotAllowedRouting: method test_transition_not_allowed (line 116) | async def test_transition_not_allowed(self): class TestFutureEdgeCases (line 138) | class TestFutureEdgeCases: method test_initial_activation_no_future (line 142) | async def test_initial_activation_no_future(self): method test_allow_event_without_transition_resolves_none (line 149) | async def test_allow_event_without_transition_resolves_none(self): method test_concurrent_sends_via_gather (line 160) | async def test_concurrent_sends_via_gather(self): method test_concurrent_sends_exception_with_catch_errors_as_events_off (line 195) | async def test_concurrent_sends_exception_with_catch_errors_as_events_... method test_separate_tasks_with_slow_callback (line 240) | async def test_separate_tasks_with_slow_callback(self): method test_separate_tasks_validator_exception_routing (line 284) | async def test_separate_tasks_validator_exception_routing(self): class TestEventQueueRejectFutures (line 327) | class TestEventQueueRejectFutures: method test_reject_futures_skips_items_without_future (line 330) | def test_reject_futures_skips_items_without_future(self): FILE: tests/test_callbacks.py function ObjectWithCallbacks (line 17) | def ObjectWithCallbacks(): class TestCallbacksMachinery (line 40) | class TestCallbacksMachinery: method test_callback_meta_is_hashable (line 41) | def test_callback_meta_is_hashable(self): method test_can_add_callback_that_is_a_string (line 45) | def test_can_add_callback_that_is_a_string(self): method test_callbacks_are_iterable (line 76) | def test_callbacks_are_iterable(self): method test_add_many_callbacks_at_once (line 84) | def test_add_many_callbacks_at_once(self): method test_raise_error_if_didnt_found_attr (line 93) | def test_raise_error_if_didnt_found_attr(self, is_convention): method test_collect_results (line 110) | def test_collect_results(self): method test_callbacks_values_resolution (line 134) | def test_callbacks_values_resolution(self, ObjectWithCallbacks): class TestCallbacksAsDecorator (line 143) | class TestCallbacksAsDecorator: method test_decorate_unbounded_function (line 144) | def test_decorate_unbounded_function(self, ObjectWithCallbacks): method test_decorate_unbounded_machine_methods (line 169) | def test_decorate_unbounded_machine_methods(self): class TestIssue406 (line 215) | class TestIssue406: method test_issue_406 (line 223) | def test_issue_406(self, mocker): class TestIssue417 (line 249) | class TestIssue417: method mock_calls (line 256) | def mock_calls(self, mocker): method model_class (line 260) | def model_class(self): method sm_class (line 280) | def sm_class(self, model_class, mock_calls): method test_issue_417_cannot_start (line 320) | def test_issue_417_cannot_start(self, model_class, sm_class, mock_calls): method test_issue_417_can_start (line 328) | def test_issue_417_can_start(self, model_class, sm_class, mock_calls, ... method test_raise_exception_if_property_is_not_found (line 337) | def test_raise_exception_if_property_is_not_found(self): class TestVisitConditionFalse (line 357) | class TestVisitConditionFalse: method test_visit_skips_when_condition_is_false (line 360) | def test_visit_skips_when_condition_is_false(self): method test_async_visit_skips_when_condition_is_false (line 374) | async def test_async_visit_skips_when_condition_is_false(self): FILE: tests/test_callbacks_isolation.py function simple_sm_cls (line 8) | def simple_sm_cls(): class TestCallbacksIsolation (line 33) | class TestCallbacksIsolation: method test_should_conditions_be_isolated (line 34) | def test_should_conditions_be_isolated(self, simple_sm_cls): method test_should_actions_be_isolated (line 48) | def test_should_actions_be_isolated(self, simple_sm_cls): FILE: tests/test_class_listeners.py class RecordingListener (line 11) | class RecordingListener: method __init__ (line 14) | def __init__(self): method after_transition (line 17) | def after_transition(self, event, source, target): class SetupListener (line 21) | class SetupListener: method __init__ (line 24) | def __init__(self): method setup (line 28) | def setup(self, sm, session=None, **kwargs): method after_transition (line 31) | def after_transition(self, event, source, target): class TestClassLevelListeners (line 35) | class TestClassLevelListeners: method test_class_level_listener_callable_creates_per_instance (line 36) | def test_class_level_listener_callable_creates_per_instance(self): method test_class_level_listener_shared_instance (line 58) | def test_class_level_listener_shared_instance(self): method test_class_level_listener_partial (line 79) | def test_class_level_listener_partial(self): method test_class_level_listener_lambda (line 102) | def test_class_level_listener_lambda(self): method test_runtime_listeners_merge_with_class_level (line 117) | def test_runtime_listeners_merge_with_class_level(self): class TestClassListenerInheritance (line 140) | class TestClassListenerInheritance: method test_child_extends_parent_listeners (line 141) | def test_child_extends_parent_listeners(self): method test_child_replaces_parent_listeners (line 163) | def test_child_replaces_parent_listeners(self): method test_grandchild_inherits_full_chain (line 185) | def test_grandchild_inherits_full_chain(self): method test_no_listeners_declared_inherits_parent (line 214) | def test_no_listeners_declared_inherits_parent(self): class TestListenerSetupProtocol (line 233) | class TestListenerSetupProtocol: method test_setup_receives_kwargs (line 234) | def test_setup_receives_kwargs(self): method test_setup_ignores_unknown_kwargs (line 246) | def test_setup_ignores_unknown_kwargs(self): method test_setup_not_called_on_shared_instances (line 258) | def test_setup_not_called_on_shared_instances(self): method test_multiple_listeners_with_different_deps (line 272) | def test_multiple_listeners_with_different_deps(self): method test_setup_receives_sm_instance (line 299) | def test_setup_receives_sm_instance(self): method test_setup_optional_kwargs_default_to_none (line 318) | def test_setup_optional_kwargs_default_to_none(self): method test_setup_required_kwarg_missing_raises_error (line 330) | def test_setup_required_kwarg_missing_raises_error(self): method test_setup_required_kwarg_provided (line 345) | def test_setup_required_kwarg_provided(self): class TestListenerValidation (line 361) | class TestListenerValidation: method test_rejects_none_in_listeners (line 362) | def test_rejects_none_in_listeners(self): method test_rejects_string_in_listeners (line 372) | def test_rejects_string_in_listeners(self): method test_rejects_number_in_listeners (line 382) | def test_rejects_number_in_listeners(self): method test_rejects_bool_in_listeners (line 392) | def test_rejects_bool_in_listeners(self): class _PickleChart (line 403) | class _PickleChart(StateChart): class _PickleMultiStepChart (line 411) | class _PickleMultiStepChart(StateChart): class TestListenerSerialization (line 421) | class TestListenerSerialization: method test_pickle_with_class_listeners (line 422) | def test_pickle_with_class_listeners(self): method test_pickle_does_not_duplicate_class_listeners (line 434) | def test_pickle_does_not_duplicate_class_listeners(self): method test_pickle_with_runtime_listeners (line 444) | def test_pickle_with_runtime_listeners(self): class TestEmptyClassListeners (line 458) | class TestEmptyClassListeners: method test_no_listeners_attribute (line 459) | def test_no_listeners_attribute(self): method test_empty_listeners_list (line 468) | def test_empty_listeners_list(self): FILE: tests/test_conditions_algebra.py class AnyConditionSM (line 8) | class AnyConditionSM(StateChart): function test_conditions_algebra_any_false (line 21) | def test_conditions_algebra_any_false(): function test_conditions_algebra_any_left_true (line 29) | def test_conditions_algebra_any_left_true(): function test_conditions_algebra_any_right_true (line 36) | def test_conditions_algebra_any_right_true(): function test_should_raise_invalid_definition_if_cond_is_not_valid_sintax (line 43) | def test_should_raise_invalid_definition_if_cond_is_not_valid_sintax(): function test_should_raise_invalid_definition_if_cond_is_not_found (line 57) | def test_should_raise_invalid_definition_if_cond_is_not_found(): FILE: tests/test_configuration.py class ParallelSM (line 15) | class ParallelSM(StateChart): class TestConfigurationStatesSetter (line 26) | class TestConfigurationStatesSetter: method test_set_empty_configuration (line 27) | def test_set_empty_configuration(self): method test_set_multi_element_configuration (line 34) | def test_set_multi_element_configuration(self): class TestConfigurationValueSetter (line 44) | class TestConfigurationValueSetter: method test_set_value_none_writes_none_to_model (line 45) | def test_set_value_none_writes_none_to_model(self): method test_set_value_plain_set_coerces_to_ordered_set (line 53) | def test_set_value_plain_set_coerces_to_ordered_set(self): class TestReadFromModelNonOrderedSet (line 65) | class TestReadFromModelNonOrderedSet: method test_read_from_model_coerces_plain_set (line 66) | def test_read_from_model_coerces_plain_set(self): class TestConfigurationDiscard (line 80) | class TestConfigurationDiscard: method test_discard_nonmatching_scalar (line 81) | def test_discard_nonmatching_scalar(self): class TestConfigurationCurrentState (line 91) | class TestConfigurationCurrentState: method test_current_state_with_multiple_active_states (line 92) | def test_current_state_with_multiple_active_states(self): class SerializingModel (line 111) | class SerializingModel: method __init__ (line 116) | def __init__(self): method state (line 120) | def state(self): method state (line 129) | def state(self, value): class WarSC (line 138) | class WarSC(StateChart): class war (line 141) | class war(State.Parallel): class region_a (line 142) | class region_a(State.Compound): class region_b (line 147) | class region_b(State.Compound): class TestAddDiscard (line 153) | class TestAddDiscard: method test_add_calls_setter_on_serializing_model (line 156) | def test_add_calls_setter_on_serializing_model(self): method test_discard_calls_setter_on_serializing_model (line 164) | def test_discard_calls_setter_on_serializing_model(self): method test_parallel_lifecycle_with_serializing_model (line 179) | def test_parallel_lifecycle_with_serializing_model(self): method test_state_restoration_from_serialized_model (line 194) | def test_state_restoration_from_serialized_model(self): method test_parallel_with_serializing_model_both_engines (line 209) | async def test_parallel_with_serializing_model_both_engines(self, sm_r... FILE: tests/test_contrib_diagram.py function _parse_svg (line 25) | def _parse_svg(graph): function _find_state_node (line 31) | def _find_state_node(svg_root, state_id): function _has_rectangular_fill (line 42) | def _has_rectangular_fill(node_g): function _path_has_curves (line 58) | def _path_has_curves(d_attr): function expected_reprs (line 79) | def expected_reprs(request): function test_machine_repr_custom_ (line 90) | def test_machine_repr_custom_(request, machine_name, expected_reprs): function test_machine_dot (line 99) | def test_machine_dot(OrderControl): class TestDiagramCmdLine (line 109) | class TestDiagramCmdLine: method test_generate_image (line 110) | def test_generate_image(self, tmp_path): method test_generate_image_from_module_path (line 119) | def test_generate_image_from_module_path(self, tmp_path): method test_generate_complain_about_bad_sm_path (line 129) | def test_generate_complain_about_bad_sm_path(self, capsys, tmp_path): method test_generate_image_with_events (line 141) | def test_generate_image_with_events(self, tmp_path): method test_generate_complain_about_module_without_sm (line 159) | def test_generate_complain_about_module_without_sm(self, tmp_path): method test_format_mermaid (line 166) | def test_format_mermaid(self, tmp_path): method test_format_md (line 182) | def test_format_md(self, tmp_path): method test_format_rst (line 198) | def test_format_rst(self, tmp_path): method test_format_mermaid_stdout (line 214) | def test_format_mermaid_stdout(self, capsys): method test_format_md_stdout (line 227) | def test_format_md_stdout(self, capsys): method test_stdout_default_svg (line 240) | def test_stdout_default_svg(self, capsys): method test_format_mermaid_with_events (line 252) | def test_format_mermaid_with_events(self, tmp_path): class TestQuickChart (line 270) | class TestQuickChart: method mock_quickchart (line 272) | def mock_quickchart(self, origin_img_path): method test_should_call_write_svg (line 280) | def test_should_call_write_svg(self, OrderControl): function test_compound_state_diagram (line 286) | def test_compound_state_diagram(): function test_parallel_state_diagram (line 309) | def test_parallel_state_diagram(): function test_nested_compound_state_diagram (line 335) | def test_nested_compound_state_diagram(): function test_subgraph_dashed_style_for_parallel_parent (line 358) | def test_subgraph_dashed_style_for_parallel_parent(): function test_initial_edge_with_compound_state_has_lhead (line 374) | def test_initial_edge_with_compound_state_has_lhead(): function test_initial_edge_inside_compound_subgraph (line 390) | def test_initial_edge_inside_compound_subgraph(): function test_history_state_shallow_diagram (line 418) | def test_history_state_shallow_diagram(): function test_history_state_deep_diagram (line 430) | def test_history_state_deep_diagram(): function test_history_state_default_transition (line 442) | def test_history_state_default_transition(): function test_parallel_state_label_indicator (line 455) | def test_parallel_state_label_indicator(): function test_history_state_in_graph_states (line 475) | def test_history_state_in_graph_states(): function test_multi_target_transition_diagram (line 485) | def test_multi_target_transition_diagram(): function test_compound_and_parallel_mixed (line 501) | def test_compound_and_parallel_mixed(): class TestSVGShapeConsistency (line 537) | class TestSVGShapeConsistency: method test_active_state_has_no_rectangular_fill (line 547) | def test_active_state_has_no_rectangular_fill(self): method test_active_and_inactive_states_use_same_svg_element_type (line 562) | def test_active_and_inactive_states_use_same_svg_element_type(self): method test_no_state_node_has_rectangular_colored_fill (line 592) | def test_no_state_node_has_rectangular_colored_fill(self): class TestExtract (line 616) | class TestExtract: method test_deep_history_state_type (line 619) | def test_deep_history_state_type(self): method test_internal_transition_actions_extracted (line 631) | def test_internal_transition_actions_extracted(self): method test_internal_transition_skipped_in_bidirectional (line 643) | def test_internal_transition_skipped_in_bidirectional(self): method test_internal_transition_without_action (line 667) | def test_internal_transition_without_action(self): method test_extract_invalid_type_raises (line 683) | def test_extract_invalid_type_raises(self): method test_resolve_initial_fallback (line 690) | def test_resolve_initial_fallback(self): class TestFormatEventNames (line 703) | class TestFormatEventNames: method test_simple_event_uses_name (line 706) | def test_simple_event_uses_name(self): method test_done_state_alias_filtered (line 717) | def test_done_state_alias_filtered(self): method test_done_invoke_alias_filtered (line 734) | def test_done_invoke_alias_filtered(self): method test_error_alias_filtered (line 747) | def test_error_alias_filtered(self): method test_multiple_distinct_events_preserved (line 760) | def test_multiple_distinct_events_preserved(self): method test_eventless_transition_returns_empty (line 776) | def test_eventless_transition_returns_empty(self): method test_dot_only_event_preserved (line 791) | def test_dot_only_event_preserved(self): method test_explicit_event_name_displayed (line 804) | def test_explicit_event_name_displayed(self): class TestDotRendererEdgeCases (line 820) | class TestDotRendererEdgeCases: method test_compound_state_with_actions_label (line 823) | def test_compound_state_with_actions_label(self): method test_internal_action_format (line 839) | def test_internal_action_format(self): method test_targetless_transition_self_loop (line 848) | def test_targetless_transition_self_loop(self): method test_compound_edge_anchor_non_bidirectional (line 860) | def test_compound_edge_anchor_non_bidirectional(self): class TestDiagramMainModule (line 868) | class TestDiagramMainModule: method test_main_module_execution (line 871) | def test_main_module_execution(self, tmp_path): class TestSphinxDirective (line 892) | class TestSphinxDirective: method test_parse_events (line 895) | def test_parse_events(self): method test_import_and_render_class (line 903) | def test_import_and_render_class(self, tmp_path): method test_import_and_render_with_events (line 913) | def test_import_and_render_with_events(self, tmp_path): method test_import_invalid_qualname (line 928) | def test_import_invalid_qualname(self): class TestSplitLength (line 936) | class TestSplitLength: method test_split_pt (line 939) | def test_split_pt(self): method test_split_px (line 946) | def test_split_px(self): method test_split_float (line 953) | def test_split_float(self): method test_split_no_match (line 960) | def test_split_no_match(self): class TestAlignSpec (line 968) | class TestAlignSpec: method test_valid_values (line 971) | def test_valid_values(self): method test_invalid_value (line 978) | def test_invalid_value(self): class TestSetup (line 985) | class TestSetup: method test_setup_returns_metadata (line 988) | def test_setup_returns_metadata(self): class TestPrepareSvg (line 999) | class TestPrepareSvg: method _make_directive (line 1002) | def _make_directive(self, options=None): method test_strips_xml_prologue (line 1010) | def test_strips_xml_prologue(self): method test_extracts_intrinsic_dimensions (line 1023) | def test_extracts_intrinsic_dimensions(self): method test_removes_fixed_dimensions (line 1031) | def test_removes_fixed_dimensions(self): method test_handles_no_dimensions (line 1040) | def test_handles_no_dimensions(self): method test_handles_px_dimensions (line 1048) | def test_handles_px_dimensions(self): class TestBuildSvgStyles (line 1057) | class TestBuildSvgStyles: method _make_directive (line 1060) | def _make_directive(self, options=None): method test_intrinsic_width_as_max_width (line 1067) | def test_intrinsic_width_as_max_width(self): method test_explicit_width (line 1073) | def test_explicit_width(self): method test_explicit_height (line 1079) | def test_explicit_height(self): method test_scale (line 1085) | def test_scale(self): method test_scale_without_intrinsic (line 1091) | def test_scale_without_intrinsic(self): method test_no_dimensions (line 1098) | def test_no_dimensions(self): method test_explicit_width_overrides_scale (line 1103) | def test_explicit_width_overrides_scale(self): class TestBuildWrapperClasses (line 1110) | class TestBuildWrapperClasses: method _make_directive (line 1113) | def _make_directive(self, options=None): method test_default_center_align (line 1120) | def test_default_center_align(self): method test_custom_align (line 1125) | def test_custom_align(self): method test_extra_css_classes (line 1130) | def test_extra_css_classes(self): class TestResolveTarget (line 1136) | class TestResolveTarget: method _make_directive (line 1139) | def _make_directive(self, options=None, tmp_path=None): method test_no_target_option (line 1150) | def test_no_target_option(self): method test_explicit_target_url (line 1154) | def test_explicit_target_url(self): method test_empty_target_generates_file (line 1158) | def test_empty_target_generates_file(self, tmp_path): method test_empty_target_deterministic_filename (line 1172) | def test_empty_target_deterministic_filename(self, tmp_path): method test_different_events_different_filename (line 1180) | def test_different_events_different_filename(self, tmp_path): class TestDirectiveRun (line 1187) | class TestDirectiveRun: method _make_directive (line 1192) | def _make_directive(self, tmp_path, options=None): method _run (line 1204) | def _run(self, tmp_path, qualname=None, options=None): method test_render_class_diagram (line 1209) | def test_render_class_diagram(self, tmp_path): method test_render_with_events (line 1222) | def test_render_with_events(self, tmp_path): method test_render_with_empty_events (line 1230) | def test_render_with_empty_events(self, tmp_path): method test_render_with_caption (line 1237) | def test_render_with_caption(self, tmp_path): method test_render_with_figclass (line 1245) | def test_render_with_figclass(self, tmp_path): method test_render_with_alt (line 1251) | def test_render_with_alt(self, tmp_path): method test_render_default_alt (line 1257) | def test_render_default_alt(self, tmp_path): method test_render_with_explicit_target (line 1263) | def test_render_with_explicit_target(self, tmp_path): method test_render_with_empty_target (line 1271) | def test_render_with_empty_target(self, tmp_path): method test_render_with_align (line 1279) | def test_render_with_align(self, tmp_path): method test_render_with_width (line 1285) | def test_render_with_width(self, tmp_path): method test_render_with_name (line 1291) | def test_render_with_name(self, tmp_path): method test_render_with_class (line 1299) | def test_render_with_class(self, tmp_path): method test_invalid_qualname_returns_warning (line 1305) | def test_invalid_qualname_returns_warning(self, tmp_path): method test_render_failure_returns_warning (line 1314) | def test_render_failure_returns_warning(self, tmp_path): method test_render_without_caption_uses_div (line 1327) | def test_render_without_caption_uses_div(self, tmp_path): class TestGraphMethod (line 1336) | class TestGraphMethod: method test_graph_returns_pydot_dot (line 1339) | def test_graph_returns_pydot_dot(self): method test_graph_reflects_active_state (line 1348) | def test_graph_reflects_active_state(self): class TestFormat (line 1358) | class TestFormat: method test_format_mermaid_instance (line 1361) | def test_format_mermaid_instance(self): method test_format_mermaid_class (line 1369) | def test_format_mermaid_class(self): method test_format_md_instance (line 1376) | def test_format_md_instance(self): method test_format_md_class (line 1384) | def test_format_md_class(self): method test_format_markdown_alias (line 1390) | def test_format_markdown_alias(self): method test_format_rst_instance (line 1396) | def test_format_rst_instance(self): method test_format_rst_class (line 1403) | def test_format_rst_class(self): method test_format_dot_instance (line 1409) | def test_format_dot_instance(self): method test_format_dot_class (line 1417) | def test_format_dot_class(self): method test_format_empty_falls_back_to_repr (line 1423) | def test_format_empty_falls_back_to_repr(self): method test_format_empty_class (line 1430) | def test_format_empty_class(self): method test_format_invalid_raises (line 1436) | def test_format_invalid_raises(self): method test_format_invalid_class_raises (line 1443) | def test_format_invalid_class_raises(self): class TestDocstringExpansion (line 1450) | class TestDocstringExpansion: method test_md_placeholder (line 1453) | def test_md_placeholder(self): method test_rst_placeholder (line 1471) | def test_rst_placeholder(self): method test_mermaid_placeholder (line 1489) | def test_mermaid_placeholder(self): method test_no_placeholder_unchanged (line 1503) | def test_no_placeholder_unchanged(self): method test_no_docstring (line 1517) | def test_no_docstring(self): method test_indentation_preserved (line 1529) | def test_indentation_preserved(self): method test_multiple_placeholders (line 1547) | def test_multiple_placeholders(self): class TestFormatter (line 1566) | class TestFormatter: method test_render_mermaid (line 1569) | def test_render_mermaid(self): method test_render_dot (line 1577) | def test_render_dot(self): method test_render_svg (line 1585) | def test_render_svg(self): method test_render_svg_instance (line 1595) | def test_render_svg_instance(self): method test_format_svg (line 1606) | def test_format_svg(self): method test_render_md (line 1612) | def test_render_md(self): method test_render_markdown_alias (line 1620) | def test_render_markdown_alias(self): method test_render_rst (line 1629) | def test_render_rst(self): method test_render_empty_repr_instance (line 1637) | def test_render_empty_repr_instance(self): method test_render_empty_repr_class (line 1645) | def test_render_empty_repr_class(self): method test_render_invalid_raises (line 1652) | def test_render_invalid_raises(self): method test_supported_formats (line 1658) | def test_supported_formats(self): method test_register_custom_format (line 1669) | def test_register_custom_format(self): method test_register_format_with_aliases (line 1681) | def test_register_format_with_aliases(self): method test_error_message_lists_primary_formats (line 1695) | def test_error_message_lists_primary_formats(self): class TestDirectiveMermaidFormat (line 1709) | class TestDirectiveMermaidFormat: method _make_directive (line 1714) | def _make_directive(self, tmp_path, options=None): method _run (line 1726) | def _run(self, tmp_path, qualname=None, options=None): method test_mermaid_format_with_sphinxcontrib (line 1731) | def test_mermaid_format_with_sphinxcontrib(self, tmp_path): method test_mermaid_format_with_caption (line 1741) | def test_mermaid_format_with_caption(self, tmp_path): method test_mermaid_format_with_caption_and_name (line 1756) | def test_mermaid_format_with_caption_and_name(self, tmp_path): method test_mermaid_format_with_name_no_caption (line 1764) | def test_mermaid_format_with_name_no_caption(self, tmp_path): method test_mermaid_format_fallback_no_sphinxcontrib (line 1772) | def test_mermaid_format_fallback_no_sphinxcontrib(self, tmp_path): method test_mermaid_render_failure_returns_warning (line 1791) | def test_mermaid_render_failure_returns_warning(self, tmp_path): FILE: tests/test_contrib_timeout.py class TestTimeoutValidation (line 13) | class TestTimeoutValidation: method test_positive_duration (line 14) | def test_positive_duration(self): method test_zero_duration_raises (line 19) | def test_zero_duration_raises(self): method test_negative_duration_raises (line 23) | def test_negative_duration_raises(self): method test_repr_without_on (line 27) | def test_repr_without_on(self): method test_repr_with_on (line 30) | def test_repr_with_on(self): class TestTimeoutBasic (line 34) | class TestTimeoutBasic: method test_timeout_fires_done_invoke (line 37) | async def test_timeout_fires_done_invoke(self, sm_runner): method test_timeout_cancelled_on_early_exit (line 49) | async def test_timeout_cancelled_on_early_exit(self, sm_runner): class TestTimeoutCustomEvent (line 65) | class TestTimeoutCustomEvent: method test_custom_event_fires (line 68) | async def test_custom_event_fires(self, sm_runner): method test_custom_event_cancelled_on_early_exit (line 80) | async def test_custom_event_cancelled_on_early_exit(self, sm_runner): class TestTimeoutComposition (line 93) | class TestTimeoutComposition: method test_invoke_completes_before_timeout (line 96) | async def test_invoke_completes_before_timeout(self, sm_runner): method test_timeout_fires_before_slow_invoke (line 115) | async def test_timeout_fires_before_slow_invoke(self, sm_runner): FILE: tests/test_copy.py function copy_pickle (line 17) | def copy_pickle(obj): function copy_method (line 22) | def copy_method(request): class GameStates (line 26) | class GameStates(str, Enum): class GameStateMachine (line 33) | class GameStateMachine(StateChart): method game_is_over (line 41) | def game_is_over(self) -> bool: class MyStateMachine (line 47) | class MyStateMachine(StateChart): method __init__ (line 53) | def __init__(self): class MySM (line 59) | class MySM(StateChart): method let_me_be_visible (line 65) | def let_me_be_visible(self): class MyModel (line 69) | class MyModel: method __init__ (line 70) | def __init__(self, name: str) -> None: method __repr__ (line 74) | def __repr__(self) -> str: method let_me_be_visible (line 78) | def let_me_be_visible(self): method let_me_be_visible (line 82) | def let_me_be_visible(self, value): function test_copy (line 86) | def test_copy(copy_method): function test_copy_with_listeners (line 99) | def test_copy_with_listeners(copy_method): function test_copy_with_enum (line 126) | def test_copy_with_enum(copy_method): function test_copy_with_custom_init_and_vars (line 135) | def test_copy_with_custom_init_and_vars(copy_method): class AsyncTrafficLightMachine (line 145) | class AsyncTrafficLightMachine(StateChart): method on_enter_state (line 152) | async def on_enter_state(self, target): function test_copy_async_statemachine_before_activation (line 156) | def test_copy_async_statemachine_before_activation(copy_method): function test_copy_async_statemachine_after_activation (line 174) | def test_copy_async_statemachine_after_activation(copy_method): FILE: tests/test_dispatcher.py function _take_first_callable (line 12) | def _take_first_callable(iterable): class Person (line 17) | class Person: method __init__ (line 18) | def __init__(self, first_name, last_name, legal_document=None): method get_full_name (line 23) | def get_full_name(self): class Organization (line 27) | class Organization: method __init__ (line 28) | def __init__(self, name, legal_document): method get_full_name (line 32) | def get_full_name(self): class TestEnsureCallable (line 36) | class TestEnsureCallable: method args (line 43) | def args(self, request): method kwargs (line 52) | def kwargs(self, request): method test_return_same_object_if_already_a_callable (line 55) | def test_return_same_object_if_already_a_callable(self): method test_retrieve_a_method_from_its_name (line 66) | def test_retrieve_a_method_from_its_name(self, args, kwargs): method test_retrieve_a_callable_from_a_property_name (line 79) | def test_retrieve_a_callable_from_a_property_name(self, args, kwargs): method test_retrieve_callable_from_a_property_name_that_should_keep_reference (line 90) | def test_retrieve_callable_from_a_property_name_that_should_keep_refer... class TestResolverFactory (line 104) | class TestResolverFactory: method test_should_chain_resolutions (line 114) | def test_should_chain_resolutions(self, attr, expected_value): method test_should_ignore_list_of_attrs (line 133) | def test_should_ignore_list_of_attrs(self, attr, expected_value): class TestSearchProperty (line 146) | class TestSearchProperty: method test_not_found_property_with_same_name (line 147) | def test_not_found_property_with_same_name(self): FILE: tests/test_error_execution.py function test_exception_in_guard_sends_error_execution (line 18) | def test_exception_in_guard_sends_error_execution(): function test_exception_in_on_enter_sends_error_execution (line 29) | def test_exception_in_on_enter_sends_error_execution(): function test_exception_in_action_sends_error_execution (line 40) | def test_exception_in_action_sends_error_execution(): function test_exception_in_after_sends_error_execution_no_rollback (line 52) | def test_exception_in_after_sends_error_execution_no_rollback(): function test_statemachine_exception_propagates (line 64) | def test_statemachine_exception_propagates(): function test_invalid_definition_always_propagates (line 74) | def test_invalid_definition_always_propagates(): function test_error_in_error_handler_no_infinite_loop (line 91) | def test_error_in_error_handler_no_infinite_loop(): function test_statemachine_with_catch_errors_as_events_true (line 107) | def test_statemachine_with_catch_errors_as_events_true(): function test_error_data_available_in_error_execution_handler (line 117) | def test_error_data_available_in_error_execution_handler(): function test_error_convention_with_transition_list (line 146) | def test_error_convention_with_transition_list(): function test_error_convention_with_event_no_explicit_id (line 156) | def test_error_convention_with_event_no_explicit_id(): function test_error_convention_preserves_explicit_id (line 166) | def test_error_convention_preserves_explicit_id(): function test_non_error_prefix_unchanged (line 184) | def test_non_error_prefix_unchanged(): class TestErrorConventionLOTR (line 203) | class TestErrorConventionLOTR: method test_ring_corrupts_bearer_convention_transition_list (line 206) | def test_ring_corrupts_bearer_convention_transition_list(self): method test_ring_corrupts_bearer_convention_event (line 224) | def test_ring_corrupts_bearer_convention_event(self): method test_explicit_id_takes_precedence (line 241) | def test_explicit_id_takes_precedence(self): method test_error_data_passed_to_handler (line 258) | def test_error_data_passed_to_handler(self): method test_error_in_guard_with_convention (line 281) | def test_error_in_guard_with_convention(self): method test_error_in_on_enter_with_convention (line 298) | def test_error_in_on_enter_with_convention(self): method test_error_in_after_with_convention (line 316) | def test_error_in_after_with_convention(self): method test_error_in_error_handler_no_loop_with_convention (line 336) | def test_error_in_error_handler_no_loop_with_convention(self): method test_multiple_source_states_with_convention (line 360) | def test_multiple_source_states_with_convention(self): method test_convention_with_self_transition_to_final (line 378) | def test_convention_with_self_transition_to_final(self): method test_statemachine_with_convention_and_flag (line 395) | def test_statemachine_with_convention_and_flag(self): method test_statemachine_without_flag_propagates (line 412) | def test_statemachine_without_flag_propagates(self): method test_no_error_handler_defined (line 430) | def test_no_error_handler_defined(self): method test_recovery_from_error_allows_further_transitions (line 447) | def test_recovery_from_error_allows_further_transitions(self): method test_error_nested_dots_convention (line 470) | def test_error_nested_dots_convention(self): method test_multiple_errors_sequential (line 492) | def test_multiple_errors_sequential(self): method test_invalid_definition_propagates_despite_convention (line 522) | def test_invalid_definition_propagates_despite_convention(self): class TestErrorHandlerBehaviorLOTR (line 541) | class TestErrorHandlerBehaviorLOTR: method test_on_callback_executes_on_error_transition (line 548) | def test_on_callback_executes_on_error_transition(self): method test_on_callback_receives_error_kwarg (line 570) | def test_on_callback_receives_error_kwarg(self): method test_error_in_on_callback_of_error_handler_is_ignored (line 594) | def test_error_in_on_callback_of_error_handler_is_ignored(self): method test_condition_on_error_transition_routes_to_different_states (line 623) | def test_condition_on_error_transition_routes_to_different_states(self): method test_condition_inspects_error_type_to_route (line 656) | def test_condition_inspects_error_type_to_route(self): method test_condition_inspects_error_message_to_route (line 679) | def test_condition_inspects_error_message_to_route(self): method test_error_handler_can_set_machine_attributes (line 701) | def test_error_handler_can_set_machine_attributes(self): method test_error_recovery_then_second_error_handled (line 731) | def test_error_recovery_then_second_error_handled(self): method test_all_conditions_false_error_unhandled (line 764) | def test_all_conditions_false_error_unhandled(self): method test_error_in_before_callback_with_convention (line 784) | def test_error_in_before_callback_with_convention(self): method test_error_in_exit_callback_with_convention (line 801) | def test_error_in_exit_callback_with_convention(self): class TestEngineErrorPropagation (line 821) | class TestEngineErrorPropagation: method test_invalid_definition_in_enter_propagates (line 822) | def test_invalid_definition_in_enter_propagates(self): method test_invalid_definition_in_after_propagates (line 838) | def test_invalid_definition_in_after_propagates(self): method test_runtime_error_in_after_without_catch_errors_as_events_propagates (line 854) | def test_runtime_error_in_after_without_catch_errors_as_events_propaga... method test_runtime_error_in_after_with_catch_errors_as_events_handled (line 872) | def test_runtime_error_in_after_with_catch_errors_as_events_handled(se... method test_runtime_error_in_microstep_without_catch_errors_as_events (line 890) | def test_runtime_error_in_microstep_without_catch_errors_as_events(self): function test_internal_queue_processes_raised_events (line 910) | def test_internal_queue_processes_raised_events(): function test_engine_start_when_already_started (line 932) | def test_engine_start_when_already_started(): function test_error_in_internal_event_transition_caught_by_microstep (line 949) | def test_error_in_internal_event_transition_caught_by_microstep(): function test_invalid_definition_in_internal_event_propagates (line 974) | def test_invalid_definition_in_internal_event_propagates(): function test_runtime_error_in_internal_event_propagates_without_catch_errors_as_events (line 999) | def test_runtime_error_in_internal_event_propagates_without_catch_errors... FILE: tests/test_events.py function test_assign_events_on_transitions (line 9) | def test_assign_events_on_transitions(): class TestExplicitEvent (line 35) | class TestExplicitEvent: method test_accept_event_instance (line 36) | def test_accept_event_instance(self): method test_accept_event_name (line 51) | def test_accept_event_name(self): method test_derive_name_from_id (line 62) | def test_derive_name_from_id(self): method test_not_derive_name_from_id_if_not_event_class (line 76) | def test_not_derive_name_from_id_if_not_event_class(self): method test_raise_invalid_definition_if_event_name_cannot_be_derived (line 90) | def test_raise_invalid_definition_if_event_name_cannot_be_derived(self): method test_derive_from_id (line 101) | def test_derive_from_id(self): method test_of_passing_event_as_parameters (line 110) | def test_of_passing_event_as_parameters(self): method test_mixing_event_and_parameters (line 144) | def test_mixing_event_and_parameters(self): method test_name_derived_from_identifier (line 176) | def test_name_derived_from_identifier(self): method test_multiple_ids_from_the_same_event_will_be_converted_to_multiple_events (line 207) | def test_multiple_ids_from_the_same_event_will_be_converted_to_multipl... method test_allow_registering_callbacks_using_decorator (line 236) | def test_allow_registering_callbacks_using_decorator(self): method test_raise_registering_callbacks_using_decorator_if_no_transitions (line 263) | def test_raise_registering_callbacks_using_decorator_if_no_transitions... method test_allow_using_events_as_commands (line 287) | def test_allow_using_events_as_commands(self): method test_event_commands_fail_when_unbound_to_instance (line 301) | def test_event_commands_fail_when_unbound_to_instance(self): function test_event_match_trailing_dot (line 313) | def test_event_match_trailing_dot(): function test_event_build_trigger_with_none_machine (line 320) | def test_event_build_trigger_with_none_machine(): function test_events_match_none_with_empty (line 327) | def test_events_match_none_with_empty(): function test_event_raises_on_non_string_id (line 335) | def test_event_raises_on_non_string_id(): FILE: tests/test_examples.py function pytest_generate_tests (line 9) | def pytest_generate_tests(metafunc): function example_file_wrapper (line 21) | def example_file_wrapper(file_name): function test_example (line 29) | async def test_example(example_file_wrapper): FILE: tests/test_fellowship_quest.py class Peril (line 24) | class Peril(Exception): class RingTemptation (line 28) | class RingTemptation(Peril): class OrcAmbush (line 32) | class OrcAmbush(Peril): class DarkSorcery (line 36) | class DarkSorcery(Peril): class TreacherousTerrain (line 40) | class TreacherousTerrain(Peril): class BalrogFury (line 44) | class BalrogFury(Peril): class Character (line 53) | class Character: method can_counter_with_magic (line 67) | def can_counter_with_magic(self, error=None, **kwargs): method can_resist_temptation (line 71) | def can_resist_temptation(self, error=None, **kwargs): method can_endure (line 75) | def can_endure(self, error=None, **kwargs): method __repr__ (line 81) | def __repr__(self): class Gandalf (line 85) | class Gandalf(Character): class Aragorn (line 93) | class Aragorn(Character): class Frodo (line 99) | class Frodo(Character): class Legolas (line 105) | class Legolas(Character): class Boromir (line 111) | class Boromir(Character): class Pippin (line 117) | class Pippin(Character): class Samwise (line 121) | class Samwise(Character): class FellowshipQuest (line 132) | class FellowshipQuest(StateChart): method encounter_danger (line 170) | def encounter_danger(self, peril, **kwargs): method is_ring_corruption (line 173) | def is_ring_corruption(self, error=None, **kwargs): method take_hit (line 177) | def take_hit(self, error=None, **kwargs): function _state_by_name (line 192) | def _state_by_name(sm, name): function test_single_peril_outcome (line 307) | def test_single_peril_outcome(character, peril, expected): function test_wound_description (line 338) | def test_wound_description(character, peril, expect_wound): function test_multi_peril_saga (line 383) | def test_multi_peril_saga(character, perils_and_states): function test_wounded_then_second_peril_is_fatal (line 420) | def test_wounded_then_second_peril_is_fatal(character, first_peril, seco... function test_recovery_after_wound (line 445) | def test_recovery_after_wound(character, peril): FILE: tests/test_invoke.py class TestInvokeSimpleCallable (line 15) | class TestInvokeSimpleCallable: method test_simple_callable_invoke (line 18) | async def test_simple_callable_invoke(self, sm_runner): method test_invoke_return_value_in_done_event (line 36) | async def test_invoke_return_value_in_done_event(self, sm_runner): class TestInvokeNamingConvention (line 55) | class TestInvokeNamingConvention: method test_naming_convention (line 58) | async def test_naming_convention(self, sm_runner): class TestInvokeDecorator (line 78) | class TestInvokeDecorator: method test_decorator_invoke (line 81) | async def test_decorator_invoke(self, sm_runner): class TestInvokeIInvokeProtocol (line 102) | class TestInvokeIInvokeProtocol: method test_iinvoke_class (line 105) | async def test_iinvoke_class(self, sm_runner): method test_each_sm_instance_gets_own_handler (line 135) | async def test_each_sm_instance_gets_own_handler(self, sm_runner): class TestInvokeCancelOnExit (line 161) | class TestInvokeCancelOnExit: method test_cancel_on_exit_sync (line 164) | async def test_cancel_on_exit_sync(self): method test_cancel_on_exit_with_on_cancel (line 190) | async def test_cancel_on_exit_with_on_cancel(self, sm_runner): class TestInvokeErrorHandling (line 217) | class TestInvokeErrorHandling: method test_error_in_invoke (line 220) | async def test_error_in_invoke(self, sm_runner): class TestInvokeMultiple (line 239) | class TestInvokeMultiple: method test_multiple_invokes (line 242) | async def test_multiple_invokes(self, sm_runner): class TestInvokeStateChartChild (line 268) | class TestInvokeStateChartChild: method test_statechart_invoker (line 271) | async def test_statechart_invoker(self, sm_runner): class TestDoneInvokeTransition (line 292) | class TestDoneInvokeTransition: method test_done_invoke_transition (line 295) | async def test_done_invoke_transition(self, sm_runner): class TestDoneInvokeEventFormat (line 308) | class TestDoneInvokeEventFormat: method test_done_invoke_event_has_no_duplicate_state_id (line 311) | async def test_done_invoke_event_has_no_duplicate_state_id(self, sm_ru... class TestInvokeGroup (line 336) | class TestInvokeGroup: method test_group_returns_ordered_results (line 339) | async def test_group_returns_ordered_results(self, sm_runner): method test_group_with_file_io (line 365) | async def test_group_with_file_io(self, sm_runner, tmp_path): method test_group_error_cancels_remaining (line 395) | async def test_group_error_cancels_remaining(self, sm_runner): method test_group_cancel_on_exit (line 421) | async def test_group_cancel_on_exit(self, sm_runner): method test_group_single_callable (line 443) | async def test_group_single_callable(self, sm_runner): method test_each_sm_instance_gets_own_group (line 462) | async def test_each_sm_instance_gets_own_group(self, sm_runner): class TestInvokeEventKwargs (line 495) | class TestInvokeEventKwargs: method test_plain_callable_receives_event_kwargs (line 498) | async def test_plain_callable_receives_event_kwargs(self, sm_runner): method test_iinvoke_handler_receives_event_kwargs_via_ctx (line 524) | async def test_iinvoke_handler_receives_event_kwargs_via_ctx(self, sm_... method test_initial_state_invoke_has_empty_kwargs (line 551) | async def test_initial_state_invoke_has_empty_kwargs(self, sm_runner): class TestInvokeNotTriggeredOnNonInvokeState (line 565) | class TestInvokeNotTriggeredOnNonInvokeState: method test_no_invoke_on_plain_state (line 568) | async def test_no_invoke_on_plain_state(self, sm_runner): class TestInvokeManagerCancelAll (line 584) | class TestInvokeManagerCancelAll: method test_cancel_all (line 587) | async def test_cancel_all(self, sm_runner): class TestInvokeCancelAlreadyTerminated (line 607) | class TestInvokeCancelAlreadyTerminated: method test_cancel_terminated_invocation (line 610) | async def test_cancel_terminated_invocation(self, sm_runner): class TestInvokeOnCancelException (line 630) | class TestInvokeOnCancelException: method test_on_cancel_exception_is_suppressed (line 633) | async def test_on_cancel_exception_is_suppressed(self, sm_runner): class TestStateChartInvokerOnCancel (line 655) | class TestStateChartInvokerOnCancel: method test_on_cancel_clears_child (line 658) | def test_on_cancel_clears_child(self): class TestNormalizeInvokeCallbacks (line 677) | class TestNormalizeInvokeCallbacks: method test_string_passes_through (line 680) | def test_string_passes_through(self): method test_already_wrapped_passes_through (line 686) | def test_already_wrapped_passes_through(self): method test_iinvoke_class_with_run_method (line 699) | def test_iinvoke_class_with_run_method(self): method test_plain_callable_passes_through (line 714) | def test_plain_callable_passes_through(self): method test_non_invoke_class_passes_through (line 726) | def test_non_invoke_class_passes_through(self): class TestResolveHandler (line 740) | class TestResolveHandler: method test_bare_iinvoke_instance (line 743) | def test_bare_iinvoke_instance(self): method test_bare_statechart_class (line 755) | def test_bare_statechart_class(self): method test_plain_callable_returns_none (line 765) | def test_plain_callable_returns_none(self): class TestInvokeCallableWrapperOnCancel (line 774) | class TestInvokeCallableWrapperOnCancel: method test_on_cancel_non_class_instance_with_on_cancel (line 777) | def test_on_cancel_non_class_instance_with_on_cancel(self): method test_on_cancel_class_not_yet_instantiated (line 796) | def test_on_cancel_class_not_yet_instantiated(self): method test_callable_wrapper_call_returns_handler (line 811) | def test_callable_wrapper_call_returns_handler(self): class TestInvokeGroupOnCancelBeforeRun (line 823) | class TestInvokeGroupOnCancelBeforeRun: method test_on_cancel_before_run (line 826) | def test_on_cancel_before_run(self): class TestDoneInvokeEventFactory (line 832) | class TestDoneInvokeEventFactory: method test_done_invoke_with_event_object (line 835) | async def test_done_invoke_with_event_object(self, sm_runner): class TestVisitNoCallbacks (line 850) | class TestVisitNoCallbacks: method test_visit_missing_key (line 853) | def test_visit_missing_key(self): method test_async_visit_missing_key (line 860) | async def test_async_visit_missing_key(self): class TestAsyncVisitAwaitable (line 867) | class TestAsyncVisitAwaitable: method test_async_visitor_fn_is_awaited (line 870) | async def test_async_visitor_fn_is_awaited(self): class TestIInvokeProtocolRun (line 888) | class TestIInvokeProtocolRun: method test_protocol_run_is_callable (line 891) | def test_protocol_run_is_callable(self): class TestSpawnPendingAsyncEmpty (line 903) | class TestSpawnPendingAsyncEmpty: method test_spawn_pending_async_no_pending (line 906) | async def test_spawn_pending_async_no_pending(self, sm_runner): class TestInvokeAsyncCancelledDuringExecution (line 917) | class TestInvokeAsyncCancelledDuringExecution: method test_success_after_cancel (line 920) | async def test_success_after_cancel(self): method test_error_after_cancel (line 944) | async def test_error_after_cancel(self): class TestSyncInvokeErrorAfterCancel (line 969) | class TestSyncInvokeErrorAfterCancel: method test_sync_error_after_cancel (line 972) | async def test_sync_error_after_cancel(self): class TestInvokeManagerUnit (line 995) | class TestInvokeManagerUnit: method test_send_to_child_not_found (line 998) | def test_send_to_child_not_found(self): method test_send_to_child_handler_without_on_event (line 1009) | def test_send_to_child_handler_without_on_event(self): method test_handle_external_event_none_event (line 1027) | def test_handle_external_event_none_event(self): class TestStopChildMachine (line 1041) | class TestStopChildMachine: method test_stop_child_machine_exception_swallowed (line 1044) | def test_stop_child_machine_exception_swallowed(self): class TestEngineDelCleanup (line 1058) | class TestEngineDelCleanup: method test_del_swallows_cancel_all_exception (line 1061) | def test_del_swallows_cancel_all_exception(self): FILE: tests/test_io.py class TestParseHistory (line 7) | class TestParseHistory: method test_history_without_transitions (line 8) | def test_history_without_transitions(self): method test_history_with_on_only (line 15) | def test_history_with_on_only(self): class TestCreateMachineWithEventNameConcat (line 25) | class TestCreateMachineWithEventNameConcat: method test_transition_with_both_parent_and_own_event_name (line 26) | def test_transition_with_both_parent_and_own_event_name(self): FILE: tests/test_listener.py class TestObserver (line 18) | class TestObserver: method test_add_log_observer (line 19) | def test_add_log_observer(self, campaign_machine, capsys): method test_log_observer_on_creation (line 40) | def test_log_observer_on_creation(self, campaign_machine, capsys): function test_regression_456 (line 60) | def test_regression_456(): FILE: tests/test_mermaid_renderer.py class TestMermaidRendererSimple (line 15) | class TestMermaidRendererSimple: method test_simple_states (line 18) | def test_simple_states(self): method test_initial_and_final (line 35) | def test_initial_and_final(self): method test_custom_direction (line 50) | def test_custom_direction(self): method test_state_name_differs_from_id (line 59) | def test_state_name_differs_from_id(self): method test_state_name_equals_id_no_declaration (line 71) | def test_state_name_equals_id_no_declaration(self): class TestMermaidRendererTransitions (line 83) | class TestMermaidRendererTransitions: method test_transition_with_guards (line 86) | def test_transition_with_guards(self): method test_eventless_transition (line 100) | def test_eventless_transition(self): method test_self_transition (line 114) | def test_self_transition(self): method test_targetless_transition (line 127) | def test_targetless_transition(self): method test_multi_target_transition (line 140) | def test_multi_target_transition(self): method test_internal_transitions_skipped (line 156) | def test_internal_transitions_skipped(self): method test_initial_transitions_skipped (line 169) | def test_initial_transitions_skipped(self): class TestMermaidRendererActiveState (line 185) | class TestMermaidRendererActiveState: method test_active_state_class (line 188) | def test_active_state_class(self): method test_no_active_state_no_classdef (line 206) | def test_no_active_state_no_classdef(self): method test_active_fill_config (line 216) | def test_active_fill_config(self): class TestMermaidRendererCompound (line 231) | class TestMermaidRendererCompound: method test_compound_state (line 234) | def test_compound_state(self): method test_compound_no_duplicate_transitions (line 255) | def test_compound_no_duplicate_transitions(self): method test_parallel_state (line 271) | def test_parallel_state(self): method test_parallel_redirects_compound_endpoints (line 291) | def test_parallel_redirects_compound_endpoints(self): method test_compound_outside_parallel_not_redirected (line 316) | def test_compound_outside_parallel_not_redirected(self): method test_nested_compound (line 332) | def test_nested_compound(self): class TestMermaidRendererPseudoStates (line 351) | class TestMermaidRendererPseudoStates: method test_history_shallow (line 354) | def test_history_shallow(self): method test_history_deep (line 374) | def test_history_deep(self): method test_choice_state (line 394) | def test_choice_state(self): method test_fork_state (line 404) | def test_fork_state(self): method test_join_state (line 414) | def test_join_state(self): class TestMermaidRendererActions (line 425) | class TestMermaidRendererActions: method test_entry_exit_actions (line 428) | def test_entry_exit_actions(self): method test_internal_action (line 448) | def test_internal_action(self): method test_empty_internal_action_skipped (line 466) | def test_empty_internal_action_skipped(self): class TestMermaidGraphMachine (line 485) | class TestMermaidGraphMachine: method test_facade_returns_string (line 488) | def test_facade_returns_string(self): method test_facade_callable (line 495) | def test_facade_callable(self): method test_facade_with_instance (line 501) | def test_facade_with_instance(self): method test_facade_custom_config (line 508) | def test_facade_custom_config(self): class TestMermaidRendererEdgeCases (line 521) | class TestMermaidRendererEdgeCases: method test_compound_state_name_equals_id (line 524) | def test_compound_state_name_equals_id(self): method test_active_compound_state (line 545) | def test_active_compound_state(self): method test_cross_scope_transition_rendered_at_parent (line 566) | def test_cross_scope_transition_rendered_at_parent(self): method test_cross_scope_to_history_state (line 598) | def test_cross_scope_to_history_state(self): method test_no_initial_state (line 634) | def test_no_initial_state(self): method test_duplicate_transition_rendered_once (line 645) | def test_duplicate_transition_rendered_once(self): method test_compound_no_initial_child (line 661) | def test_compound_no_initial_child(self): class TestMermaidRendererIntegration (line 685) | class TestMermaidRendererIntegration: method test_traffic_light (line 688) | def test_traffic_light(self): method test_traffic_light_with_events (line 696) | def test_traffic_light_with_events(self): FILE: tests/test_mixins.py class MyMixedModel (line 7) | class MyMixedModel(MyModel, MachineMixin): function test_mixin_should_instantiate_a_machine (line 11) | def test_mixin_should_instantiate_a_machine(campaign_machine): function test_mixin_should_raise_exception_if_machine_class_does_not_exist (line 18) | def test_mixin_should_raise_exception_if_machine_class_does_not_exist(): function test_mixin_should_skip_init_for_django_historical_models (line 26) | def test_mixin_should_skip_init_for_django_historical_models(): FILE: tests/test_mock_compatibility.py function test_minimal (line 5) | def test_minimal(mocker): FILE: tests/test_multiple_destinations.py class Request (line 8) | class Request: method __init__ (line 9) | def __init__(self, state="requested"): method is_ok (line 13) | def is_ok(self): function test_transition_should_choose_final_state_on_multiple_possibilities (line 17) | def test_transition_should_choose_final_state_on_multiple_possibilities( function test_transition_to_first_that_executes_if_multiple_targets (line 51) | def test_transition_to_first_that_executes_if_multiple_targets(): function test_do_not_transition_if_multiple_targets_with_guard (line 67) | def test_do_not_transition_if_multiple_targets_with_guard(): function test_check_invalid_reference_to_conditions (line 101) | def test_check_invalid_reference_to_conditions(): function test_should_change_to_returned_state_on_multiple_target_with_combined_transitions (line 117) | def test_should_change_to_returned_state_on_multiple_target_with_combine... function test_transition_on_execute_should_be_called_with_run_syntax (line 170) | def test_transition_on_execute_should_be_called_with_run_syntax(approval... function test_multiple_values_returned_with_multiple_targets (line 184) | def test_multiple_values_returned_with_multiple_targets(): function test_multiple_targets_using_or_starting_from_same_origin (line 211) | def test_multiple_targets_using_or_starting_from_same_origin(payment_fai... function test_order_control (line 229) | def test_order_control(OrderControl): FILE: tests/test_profiling.py class OrderControl (line 15) | class OrderControl(StateChart): class Order (line 32) | class Order: method __init__ (line 33) | def __init__(self): method payments_enough (line 39) | def payments_enough(self, amount): method before_add_to_order (line 42) | def before_add_to_order(self, amount): method on_receive_payment (line 46) | def on_receive_payment(self, amount): method after_receive_payment (line 50) | def after_receive_payment(self): class CompoundSC (line 55) | class CompoundSC(StateChart): class active (line 56) | class active(State.Compound, name="Active"): class ParallelSC (line 69) | class ParallelSC(StateChart): class both (line 70) | class both(State.Parallel, name="Both"): class left (line 71) | class left(State.Compound, name="Left"): class right (line 77) | class right(State.Compound, name="Right"): class GuardedSC (line 88) | class GuardedSC(StateChart): method check_a (line 93) | def check_a(self): method check_b (line 96) | def check_b(self): class HistoryShallowSC (line 104) | class HistoryShallowSC(StateChart): class process (line 105) | class process(State.Compound, name="Process"): class DeepHistorySC (line 119) | class DeepHistorySC(StateChart): class outer (line 120) | class outer(State.Compound, name="Outer"): class inner (line 121) | class inner(State.Compound, name="Inner"): class ManyTransitionsSC (line 139) | class ManyTransitionsSC(StateChart): function create_order (line 159) | def create_order(): function add_to_order (line 164) | def add_to_order(sm, amount): class TestSetupPerformance (line 174) | class TestSetupPerformance: method test_flat_machine (line 177) | def test_flat_machine(self, benchmark): method test_compound_machine (line 180) | def test_compound_machine(self, benchmark): method test_parallel_machine (line 183) | def test_parallel_machine(self, benchmark): method test_guarded_machine (line 186) | def test_guarded_machine(self, benchmark): method test_history_machine (line 189) | def test_history_machine(self, benchmark): method test_deep_history_machine (line 192) | def test_deep_history_machine(self, benchmark): class TestEventPerformance (line 202) | class TestEventPerformance: method test_flat_self_transition (line 205) | def test_flat_self_transition(self, benchmark): method test_compound_enter_exit (line 211) | def test_compound_enter_exit(self, benchmark): method test_parallel_region_events (line 222) | def test_parallel_region_events(self, benchmark): method test_guarded_transitions (line 235) | def test_guarded_transitions(self, benchmark): method test_history_pause_resume (line 245) | def test_history_pause_resume(self, benchmark): method test_deep_history_cycle (line 257) | def test_deep_history_cycle(self, benchmark): method test_many_transitions_full_cycle (line 270) | def test_many_transitions_full_cycle(self, benchmark): method test_many_transitions_reset (line 283) | def test_many_transitions_reset(self, benchmark): FILE: tests/test_registry.py function django_autodiscover_modules (line 7) | def django_autodiscover_modules(): function test_should_register_a_state_machine (line 14) | def test_should_register_a_state_machine(caplog, django_autodiscover_mod... function test_load_modules_should_call_autodiscover_modules (line 32) | def test_load_modules_should_call_autodiscover_modules(django_autodiscov... FILE: tests/test_rtc.py function chained_after_sm_class (line 11) | def chained_after_sm_class(): # noqa: C901 function chained_on_sm_class (line 47) | def chained_on_sm_class(): # noqa: C901 class TestChainedTransition (line 87) | class TestChainedTransition: method test_should_allow_chaining_transitions_using_actions (line 106) | def test_should_allow_chaining_transitions_using_actions( method test_should_preserve_event_order (line 140) | def test_should_preserve_event_order(self, chained_on_sm_class, expect... class TestAsyncEngineRTC (line 151) | class TestAsyncEngineRTC: method test_should_preserve_event_order (line 176) | def test_should_preserve_event_order(self, expected): # noqa: C901 FILE: tests/test_scxml_units.py class TestParseTimeErrors (line 27) | class TestParseTimeErrors: method test_invalid_milliseconds_value (line 28) | def test_invalid_milliseconds_value(self): method test_invalid_seconds_value (line 33) | def test_invalid_seconds_value(self): method test_invalid_unit (line 38) | def test_invalid_unit(self): class TestStripNamespaces (line 47) | class TestStripNamespaces: method test_removes_namespace_from_attributes (line 48) | def test_removes_namespace_from_attributes(self): class TestParseScxml (line 58) | class TestParseScxml: method test_no_scxml_element_raises (line 59) | def test_no_scxml_element_raises(self): class TestParseState (line 66) | class TestParseState: method test_state_without_id_gets_auto_generated (line 67) | def test_state_without_id_gets_auto_generated(self): class TestParseHistory (line 76) | class TestParseHistory: method test_history_without_id_raises (line 77) | def test_history_without_id_raises(self): class TestParseElement (line 88) | class TestParseElement: method test_unknown_tag_raises (line 89) | def test_unknown_tag_raises(self): class TestParseSendParam (line 96) | class TestParseSendParam: method test_param_without_expr_or_location_raises (line 97) | def test_param_without_expr_or_location_raises(self): class TestCreateActionCallable (line 115) | class TestCreateActionCallable: method test_unknown_action_type_raises (line 116) | def test_unknown_action_type_raises(self): class TestLogAction (line 124) | class TestLogAction: method test_log_without_label (line 125) | def test_log_without_label(self, capsys): class TestCancelActionCallable (line 134) | class TestCancelActionCallable: method test_cancel_without_sendid_raises (line 135) | def test_cancel_without_sendid_raises(self): class TestCreateDatamodelCallable (line 145) | class TestCreateDatamodelCallable: method test_empty_datamodel_returns_none (line 146) | def test_empty_datamodel_returns_none(self): class TestIfBranch (line 156) | class TestIfBranch: method test_str_with_none_cond (line 157) | def test_str_with_none_cond(self): method test_str_with_cond (line 162) | def test_str_with_cond(self): class TestSCXMLIfConditionError (line 171) | class TestSCXMLIfConditionError: method test_if_condition_error_sends_error_execution (line 174) | def test_if_condition_error_sends_error_execution(self): class TestSCXMLForeachArrayError (line 197) | class TestSCXMLForeachArrayError: method test_foreach_bad_array_raises (line 200) | def test_foreach_bad_array_raises(self): class TestSCXMLParallelFinalState (line 227) | class TestSCXMLParallelFinalState: method test_parallel_state_done_when_all_regions_final (line 230) | def test_parallel_state_done_when_all_regions_final(self): class TestEventDataWrapperMultipleArgs (line 263) | class TestEventDataWrapperMultipleArgs: method test_data_returns_tuple_for_multiple_args (line 266) | def test_data_returns_tuple_for_multiple_args(self): class TestIfActionRaisesWithoutErrorOnExecution (line 286) | class TestIfActionRaisesWithoutErrorOnExecution: method test_if_condition_error_propagates_without_catch_errors_as_events (line 289) | def test_if_condition_error_propagates_without_catch_errors_as_events(... class TestSCXMLSendWithParamNoExpr (line 306) | class TestSCXMLSendWithParamNoExpr: method test_send_param_with_location_only (line 309) | def test_send_param_with_location_only(self): class TestSCXMLHistoryWithoutTransitions (line 335) | class TestSCXMLHistoryWithoutTransitions: method test_history_without_transitions (line 338) | def test_history_without_transitions(self): function _make_invoker (line 368) | def _make_invoker(definition=None, base_dir=None, register_child=None): class TestSCXMLInvoker (line 383) | class TestSCXMLInvoker: method test_invalid_invoke_type_raises (line 384) | def test_invalid_invoke_type_raises(self): method test_no_content_resolved_raises (line 398) | def test_no_content_resolved_raises(self): method test_resolve_content_inline_xml (line 409) | def test_resolve_content_inline_xml(self): method test_resolve_content_from_file (line 418) | def test_resolve_content_from_file(self, tmp_path): method test_evaluate_params_namelist_and_params (line 429) | def test_evaluate_params_namelist_and_params(self): method test_on_cancel_clears_child (line 443) | def test_on_cancel_clears_child(self): method test_on_event_skips_terminated_child (line 451) | def test_on_event_skips_terminated_child(self): method test_on_finalize_without_block_is_noop (line 462) | def test_on_finalize_without_block_is_noop(self): method test_send_to_parent_warns_without_session (line 471) | def test_send_to_parent_warns_without_session(self, caplog): class TestSendToInvoke (line 489) | class TestSendToInvoke: method _make_machine_with_invoke_manager (line 492) | def _make_machine_with_invoke_manager(self, send_to_child_return=True): method test_routes_event_to_child (line 500) | def test_routes_event_to_child(self): method test_sends_error_communication_when_child_not_found (line 515) | def test_sends_error_communication_when_child_not_found(self): method test_evaluates_eventexpr (line 529) | def test_evaluates_eventexpr(self): method test_forwards_params (line 543) | def test_forwards_params(self): method test_forwards_namelist_variables (line 561) | def test_forwards_namelist_variables(self): method test_namelist_missing_variable_raises (line 579) | def test_namelist_missing_variable_raises(self): method test_send_action_callable_routes_invoke_target (line 591) | def test_send_action_callable_routes_invoke_target(self): method test_send_action_callable_scxml_session_target (line 604) | def test_send_action_callable_scxml_session_target(self): class TestEventDataWrapperEdgeCases (line 624) | class TestEventDataWrapperEdgeCases: method test_no_event_data_no_trigger_data_raises (line 625) | def test_no_event_data_no_trigger_data_raises(self): method test_getattr_with_event_data_delegates (line 630) | def test_getattr_with_event_data_delegates(self): method test_getattr_without_event_data_raises (line 640) | def test_getattr_without_event_data_raises(self): method test_name_via_trigger_data (line 648) | def test_name_via_trigger_data(self): class TestSendToParentParams (line 659) | class TestSendToParentParams: method test_send_to_parent_with_namelist_and_params (line 660) | def test_send_to_parent_with_namelist_and_params(self): method test_send_to_parent_namelist_missing_raises (line 683) | def test_send_to_parent_namelist_missing_raises(self): method test_send_to_parent_param_without_expr_skipped (line 697) | def test_send_to_parent_param_without_expr_skipped(self): class TestSendToInvokeParamSkip (line 724) | class TestSendToInvokeParamSkip: method test_param_without_expr_is_skipped (line 725) | def test_param_without_expr_is_skipped(self): class TestInvokeInitCallback (line 754) | class TestInvokeInitCallback: method test_invoke_init_idempotent (line 755) | def test_invoke_init_idempotent(self): class TestSCXMLInvokerEdgeCases (line 775) | class TestSCXMLInvokerEdgeCases: method test_on_event_exception_in_child_send (line 776) | def test_on_event_exception_in_child_send(self): method test_resolve_content_expr_non_string (line 788) | def test_resolve_content_expr_non_string(self): method test_evaluate_params_with_location (line 798) | def test_evaluate_params_with_location(self): class TestParserAssignChildXml (line 817) | class TestParserAssignChildXml: method test_assign_with_child_xml_content (line 818) | def test_assign_with_child_xml_content(self): method test_assign_with_text_content (line 839) | def test_assign_with_text_content(self): class TestParserInvokeContent (line 859) | class TestParserInvokeContent: method test_invoke_with_text_content (line 860) | def test_invoke_with_text_content(self): method test_invoke_with_content_expr (line 876) | def test_invoke_with_content_expr(self): method test_invoke_with_inline_scxml_no_namespace (line 891) | def test_invoke_with_inline_scxml_no_namespace(self): method test_invoke_with_unknown_child_element (line 906) | def test_invoke_with_unknown_child_element(self): method test_invoke_with_empty_content (line 922) | def test_invoke_with_empty_content(self): method test_invoke_with_finalize_block (line 937) | def test_invoke_with_finalize_block(self): class TestParserAssignEdgeCases (line 957) | class TestParserAssignEdgeCases: method test_assign_without_children_or_text (line 958) | def test_assign_without_children_or_text(self): class TestSCXMLInvokerResolveContentAbsolutePath (line 978) | class TestSCXMLInvokerResolveContentAbsolutePath: method test_resolve_content_absolute_path (line 979) | def test_resolve_content_absolute_path(self, tmp_path): class TestSCXMLInvokerEvaluateParamsNoExprNoLocation (line 991) | class TestSCXMLInvokerEvaluateParamsNoExprNoLocation: method test_param_without_expr_or_location_skipped (line 992) | def test_param_without_expr_or_location_skipped(self): class TestInvokeInitMachineNone (line 1005) | class TestInvokeInitMachineNone: method test_invoke_init_without_machine_is_noop (line 1006) | def test_invoke_init_without_machine_is_noop(self): class TestInvokeCallableWrapperRunInstance (line 1015) | class TestInvokeCallableWrapperRunInstance: method test_run_with_instance_not_class (line 1016) | def test_run_with_instance_not_class(self): class TestOrderedSetStr (line 1034) | class TestOrderedSetStr: method test_str_representation (line 1035) | def test_str_representation(self): FILE: tests/test_signature.py function single_positional_param (line 9) | def single_positional_param(a): function single_default_keyword_param (line 13) | def single_default_keyword_param(a=42): function args_param (line 17) | def args_param(*args): function kwargs_param (line 21) | def kwargs_param(**kwargs): function args_and_kwargs_param (line 25) | def args_and_kwargs_param(*args, **kwargs): function positional_optional_catchall (line 29) | def positional_optional_catchall(a, b="ham", *args): function ignored_param (line 33) | def ignored_param(a, b, *, c, d=10): function positional_and_kw_arguments (line 37) | def positional_and_kw_arguments(source, target, event): function default_kw_arguments (line 41) | def default_kw_arguments(source: str = "A", target: str = "B", event: st... class MyObject (line 45) | class MyObject: method __init__ (line 46) | def __init__(self, value=42): method method_no_argument (line 49) | def method_no_argument(self): class TestSignatureAdapter (line 53) | class TestSignatureAdapter: method test_wrap_fn_single_positional_parameter (line 149) | def test_wrap_fn_single_positional_parameter(self, func, args, kwargs,... method test_support_for_partial (line 159) | def test_support_for_partial(self): function named_and_kwargs (line 167) | def named_and_kwargs(source, **kwargs): class TestCachedBindExpected (line 171) | class TestCachedBindExpected: method setup_method (line 175) | def setup_method(self): method test_named_param_not_leaked_into_kwargs (line 178) | def test_named_param_not_leaked_into_kwargs(self): method test_kwargs_only_receives_unmatched_keys_with_positional (line 190) | def test_kwargs_only_receives_unmatched_keys_with_positional(self): method test_var_positional_collected_as_tuple (line 200) | def test_var_positional_collected_as_tuple(self): method test_keyword_only_after_var_positional (line 214) | def test_keyword_only_after_var_positional(self): method test_positional_or_keyword_prefers_kwargs_over_positional (line 228) | def test_positional_or_keyword_prefers_kwargs_over_positional(self): method test_empty_var_positional (line 244) | def test_empty_var_positional(self): method test_named_params_before_var_positional (line 264) | def test_named_params_before_var_positional(self): method test_kwargs_wins_with_var_positional_present (line 278) | def test_kwargs_wins_with_var_positional_present(self): FILE: tests/test_signature_positional_only.py class TestSignatureAdapter (line 7) | class TestSignatureAdapter: method test_positional_only (line 22) | def test_positional_only(self, args, kwargs, expected): FILE: tests/test_spec_parser.py function variable_hook (line 13) | def variable_hook( function test_expressions (line 178) | def test_expressions(expression, expected, hooks_called): function test_negating_compound_false_expression (line 189) | def test_negating_compound_false_expression(): function test_expression_name_uniqueness (line 196) | def test_expression_name_uniqueness(): function test_classical_operators_name (line 204) | def test_classical_operators_name(): function test_empty_expression (line 213) | def test_empty_expression(): function test_whitespace_expression (line 219) | def test_whitespace_expression(): function test_missing_operator_expression (line 225) | def test_missing_operator_expression(): function test_dict_usage_expression (line 231) | def test_dict_usage_expression(): function test_unsupported_operator (line 237) | def test_unsupported_operator(): function test_simple_variable_returns_the_original_callback (line 244) | def test_simple_variable_returns_the_original_callback(): function async_variable_hook (line 259) | def async_variable_hook(var_name): function test_async_expressions (line 301) | def test_async_expressions(expression, expected): function mixed_variable_hook (line 309) | def mixed_variable_hook(var_name): function test_mixed_sync_async_expressions (line 344) | def test_mixed_sync_async_expressions(expression, expected): function test_functions_get_unknown_raises (line 354) | def test_functions_get_unknown_raises(): FILE: tests/test_state.py function sm_class (line 9) | def sm_class(): class TestState (line 21) | class TestState: method test_name_derived_from_id (line 22) | def test_name_derived_from_id(self, sm_class): method test_state_from_instance_is_hashable (line 27) | def test_state_from_instance_is_hashable(self, sm_class): method test_state_knows_if_its_initial (line 32) | def test_state_knows_if_its_initial(self, sm_class): method test_state_knows_if_its_final (line 38) | def test_state_knows_if_its_final(self, sm_class): function test_ordered_set_clear (line 45) | def test_ordered_set_clear(): function test_ordered_set_getitem (line 52) | def test_ordered_set_getitem(): function test_ordered_set_getitem_out_of_range (line 59) | def test_ordered_set_getitem_out_of_range(): function test_ordered_set_union (line 66) | def test_ordered_set_union(): FILE: tests/test_state_callbacks.py function event_mock (line 7) | def event_mock(): function traffic_light_machine (line 12) | def traffic_light_machine(event_mock): # noqa: C901 class TestStateCallbacks (line 52) | class TestStateCallbacks: method test_should_call_on_enter_generic_state (line 53) | def test_should_call_on_enter_generic_state(self, event_mock, traffic_... method test_should_call_on_exit_generic_state (line 61) | def test_should_call_on_exit_generic_state(self, event_mock, traffic_l... method test_should_call_on_enter_of_specific_state (line 66) | def test_should_call_on_enter_of_specific_state(self, event_mock, traf... method test_should_call_on_exit_of_specific_state (line 71) | def test_should_call_on_exit_of_specific_state(self, event_mock, traff... method test_should_be_on_the_previous_state_when_exiting (line 76) | def test_should_be_on_the_previous_state_when_exiting(self, event_mock... method test_should_be_on_the_next_state_when_entering (line 90) | def test_should_be_on_the_next_state_when_entering(self, event_mock, t... FILE: tests/test_statechart_compound.py class TestCompoundStates (line 26) | class TestCompoundStates: method test_enter_compound_activates_initial_child (line 27) | async def test_enter_compound_activates_initial_child(self, sm_runner): method test_transition_within_compound (line 32) | async def test_transition_within_compound(self, sm_runner): method test_exit_compound_removes_all_descendants (line 40) | async def test_exit_compound_removes_all_descendants(self, sm_runner): method test_nested_compound_two_levels (line 46) | async def test_nested_compound_two_levels(self, sm_runner): method test_transition_from_inner_to_outer (line 51) | async def test_transition_from_inner_to_outer(self, sm_runner): method test_cross_compound_transition (line 57) | async def test_cross_compound_transition(self, sm_runner): method test_enter_compound_lands_on_initial (line 69) | async def test_enter_compound_lands_on_initial(self, sm_runner): method test_final_child_fires_done_state (line 76) | async def test_final_child_fires_done_state(self, sm_runner): method test_multiple_compound_sequential_traversal (line 84) | async def test_multiple_compound_sequential_traversal(self, sm_runner): method test_entry_exit_action_ordering (line 95) | async def test_entry_exit_action_ordering(self, sm_runner): method test_callbacks_inside_compound_class (line 122) | async def test_callbacks_inside_compound_class(self, sm_runner): method test_done_state_inside_compound (line 143) | async def test_done_state_inside_compound(self, sm_runner): method test_done_invoke_inside_compound (line 166) | async def test_done_invoke_inside_compound(self, sm_runner): method test_error_execution_inside_compound (line 184) | async def test_error_execution_inside_compound(self, sm_runner): method test_compound_state_name_attribute (line 207) | def test_compound_state_name_attribute(self): FILE: tests/test_statechart_delayed.py class TestDelayedEvents (line 21) | class TestDelayedEvents: method test_delayed_event_fires_after_delay (line 22) | async def test_delayed_event_fires_after_delay(self, sm_runner): method test_cancel_delayed_event (line 48) | async def test_cancel_delayed_event(self, sm_runner): method test_zero_delay_fires_immediately (line 68) | async def test_zero_delay_fires_immediately(self, sm_runner): method test_delayed_event_on_event_definition (line 81) | async def test_delayed_event_on_event_definition(self, sm_runner): FILE: tests/test_statechart_donedata.py class TestDoneData (line 26) | class TestDoneData: method test_donedata_callable_returns_dict (line 27) | async def test_donedata_callable_returns_dict(self, sm_runner): method test_donedata_fires_done_state_with_data (line 34) | async def test_donedata_fires_done_state_with_data(self, sm_runner): method test_donedata_in_nested_compound (line 40) | async def test_donedata_in_nested_compound(self, sm_runner): method test_donedata_only_on_final_state (line 48) | def test_donedata_only_on_final_state(self): method test_donedata_with_listener (line 58) | async def test_donedata_with_listener(self, sm_runner): class TestDoneStateConvention (line 86) | class TestDoneStateConvention: method test_done_state_convention_with_transition_list (line 87) | async def test_done_state_convention_with_transition_list(self, sm_run... method test_done_state_convention_with_event_no_explicit_id (line 93) | async def test_done_state_convention_with_event_no_explicit_id(self, s... method test_done_state_convention_preserves_explicit_id (line 99) | async def test_done_state_convention_preserves_explicit_id(self, sm_ru... method test_done_state_convention_with_multi_word_state (line 105) | async def test_done_state_convention_with_multi_word_state(self, sm_ru... FILE: tests/test_statechart_error.py class TestErrorExecutionStatechart (line 16) | class TestErrorExecutionStatechart: method test_error_in_compound_child_onentry (line 17) | async def test_error_in_compound_child_onentry(self, sm_runner): method test_error_in_parallel_region_isolation (line 37) | async def test_error_in_parallel_region_isolation(self, sm_runner): method test_error_recovery_exits_compound (line 64) | async def test_error_recovery_exits_compound(self, sm_runner): FILE: tests/test_statechart_eventless.py class TestEventlessTransitions (line 22) | class TestEventlessTransitions: method test_eventless_fires_when_condition_met (line 23) | async def test_eventless_fires_when_condition_met(self, sm_runner): method test_eventless_does_not_fire_when_condition_false (line 33) | async def test_eventless_does_not_fire_when_condition_false(self, sm_r... method test_eventless_chain_cascades (line 40) | async def test_eventless_chain_cascades(self, sm_runner): method test_eventless_gradual_condition (line 46) | async def test_eventless_gradual_condition(self, sm_runner): method test_eventless_in_compound_state (line 58) | async def test_eventless_in_compound_state(self, sm_runner): method test_eventless_with_in_condition (line 64) | async def test_eventless_with_in_condition(self, sm_runner): method test_eventless_chain_with_final_triggers_done (line 75) | async def test_eventless_chain_with_final_triggers_done(self, sm_runner): FILE: tests/test_statechart_history.py class TestHistoryStates (line 20) | class TestHistoryStates: method test_shallow_history_remembers_last_child (line 21) | async def test_shallow_history_remembers_last_child(self, sm_runner): method test_shallow_history_default_on_first_visit (line 34) | async def test_shallow_history_default_on_first_visit(self, sm_runner): method test_deep_history_remembers_full_descendant (line 42) | async def test_deep_history_remembers_full_descendant(self, sm_runner): method test_multiple_exits_and_reentries (line 56) | async def test_multiple_exits_and_reentries(self, sm_runner): method test_history_after_state_change (line 73) | async def test_history_after_state_change(self, sm_runner): method test_shallow_only_remembers_immediate_child (line 81) | async def test_shallow_only_remembers_immediate_child(self, sm_runner): method test_history_values_dict_populated (line 94) | async def test_history_values_dict_populated(self, sm_runner): method test_history_with_default_transition (line 104) | async def test_history_with_default_transition(self, sm_runner): FILE: tests/test_statechart_in_condition.py class TestInCondition (line 21) | class TestInCondition: method test_in_condition_true_enables_transition (line 22) | async def test_in_condition_true_enables_transition(self, sm_runner): method test_in_condition_false_blocks_transition (line 30) | async def test_in_condition_false_blocks_transition(self, sm_runner): method test_in_with_parallel_regions (line 36) | async def test_in_with_parallel_regions(self, sm_runner): method test_in_with_compound_descendant (line 48) | async def test_in_with_compound_descendant(self, sm_runner): method test_in_combined_with_event (line 60) | async def test_in_combined_with_event(self, sm_runner): method test_in_with_eventless_transition (line 70) | async def test_in_with_eventless_transition(self, sm_runner): FILE: tests/test_statechart_parallel.py class TestParallelStates (line 20) | class TestParallelStates: method test_parallel_activates_all_regions (line 21) | async def test_parallel_activates_all_regions(self, sm_runner): method test_independent_transitions_in_regions (line 33) | async def test_independent_transitions_in_regions(self, sm_runner): method test_configuration_includes_all_active_states (line 42) | async def test_configuration_includes_all_active_states(self, sm_runner): method test_exit_parallel_exits_all_regions (line 56) | async def test_exit_parallel_exits_all_regions(self, sm_runner): method test_event_in_one_region_no_effect_on_others (line 63) | async def test_event_in_one_region_no_effect_on_others(self, sm_runner): method test_parallel_with_compound_children (line 72) | async def test_parallel_with_compound_children(self, sm_runner): method test_current_state_value_set_comparison (line 79) | async def test_current_state_value_set_comparison(self, sm_runner): method test_parallel_done_when_all_regions_final (line 94) | async def test_parallel_done_when_all_regions_final(self, sm_runner): method test_parallel_not_done_when_one_region_final (line 105) | async def test_parallel_not_done_when_one_region_final(self, sm_runner): method test_transition_within_compound_inside_parallel (line 113) | async def test_transition_within_compound_inside_parallel(self, sm_run... method test_top_level_parallel_terminates_when_all_children_final (line 122) | async def test_top_level_parallel_terminates_when_all_children_final(s... method test_top_level_parallel_done_state_fires_before_termination (line 133) | async def test_top_level_parallel_done_state_fires_before_termination(... method test_top_level_parallel_not_terminated_when_one_region_pending (line 142) | async def test_top_level_parallel_not_terminated_when_one_region_pendi... FILE: tests/test_statemachine.py function test_machine_repr (line 11) | def test_machine_repr(campaign_machine): function test_machine_should_be_at_start_state (line 20) | def test_machine_should_be_at_start_state(campaign_machine): function test_machine_should_only_allow_only_one_initial_state (line 39) | def test_machine_should_only_allow_only_one_initial_state(): function test_machine_should_activate_initial_state (line 56) | def test_machine_should_activate_initial_state(mocker): function test_machine_should_not_allow_transitions_from_final_state (line 89) | def test_machine_should_not_allow_transitions_from_final_state(): function test_should_change_state (line 104) | def test_should_change_state(campaign_machine): function test_should_run_a_transition_that_keeps_the_state (line 117) | def test_should_run_a_transition_that_keeps_the_state(campaign_machine): function test_should_change_state_with_multiple_machine_instances (line 137) | def test_should_change_state_with_multiple_machine_instances(campaign_ma... function test_machine_should_list_allowed_events_in_the_current_state (line 158) | def test_machine_should_list_allowed_events_in_the_current_state(campaig... function test_machine_should_run_a_transition_by_his_key (line 176) | def test_machine_should_run_a_transition_by_his_key(campaign_machine): function test_machine_should_use_and_model_attr_other_than_state (line 191) | def test_machine_should_use_and_model_attr_other_than_state(campaign_mac... function test_cant_assign_an_invalid_state_directly (line 205) | def test_cant_assign_an_invalid_state_directly(campaign_machine): function test_should_allow_validate_data_for_transition (line 211) | def test_should_allow_validate_data_for_transition(campaign_machine_with... function test_should_check_if_is_in_status (line 223) | def test_should_check_if_is_in_status(campaign_machine): function test_defined_value_must_be_assigned_to_models (line 244) | def test_defined_value_must_be_assigned_to_models(campaign_machine_with_... function test_state_machine_without_model (line 255) | def test_state_machine_without_model(campaign_machine): function test_state_machine_with_a_start_value (line 277) | def test_state_machine_with_a_start_value(request, model, machine_name, ... function test_state_machine_with_a_invalid_start_value (line 294) | def test_state_machine_with_a_invalid_start_value(request, model, machin... function test_state_machine_with_a_invalid_model_state_value (line 300) | def test_state_machine_with_a_invalid_model_state_value(request, campaig... function test_should_not_create_instance_of_abstract_machine (line 309) | def test_should_not_create_instance_of_abstract_machine(): function test_should_not_create_instance_of_machine_without_states (line 319) | def test_should_not_create_instance_of_machine_without_states(): function test_should_not_create_instance_of_machine_without_transitions (line 329) | def test_should_not_create_instance_of_machine_without_transitions(): function test_should_not_create_disconnected_machine (line 338) | def test_should_not_create_disconnected_machine(): function test_should_not_create_big_disconnected_machine (line 355) | def test_should_not_create_big_disconnected_machine(): function test_disconnected_validation_bypassed_by_flag (line 377) | def test_disconnected_validation_bypassed_by_flag(): function test_parallel_states_reachable_without_disabling_flag (line 392) | def test_parallel_states_reachable_without_disabling_flag(): function test_compound_substates_reachable_without_disabling_flag (line 411) | def test_compound_substates_reachable_without_disabling_flag(): function test_history_state_reachable_without_disabling_flag (line 428) | def test_history_state_reachable_without_disabling_flag(): function test_state_value_is_correct (line 447) | def test_state_value_is_correct(): function test_final_states (line 462) | def test_final_states(campaign_machine_with_final_state): function test_should_not_override_states_properties (line 470) | def test_should_not_override_states_properties(campaign_machine): class TestWarnings (line 478) | class TestWarnings: method test_should_warn_if_model_already_has_attribute_and_binding_is_enabled (line 479) | def test_should_warn_if_model_already_has_attribute_and_binding_is_ena... method test_should_raise_if_thereis_a_trap_state (line 506) | def test_should_raise_if_thereis_a_trap_state(self): method test_should_raise_if_no_path_to_a_final_state (line 518) | def test_should_raise_if_no_path_to_a_final_state(self): function test_model_with_custom_bool_is_not_replaced (line 534) | def test_model_with_custom_bool_is_not_replaced(campaign_machine): function test_abstract_sm_no_states (line 549) | def test_abstract_sm_no_states(): function test_raise_sends_internal_event (line 558) | def test_raise_sends_internal_event(): function test_configuration_values_returns_ordered_set (line 572) | def test_configuration_values_returns_ordered_set(): function test_states_getitem (line 586) | def test_states_getitem(): function test_multiple_initial_states_raises (line 599) | def test_multiple_initial_states_raises(): function test_configuration_values_returns_orderedset_when_compound_state (line 610) | def test_configuration_values_returns_orderedset_when_compound_state(): class TestEnabledEvents (line 633) | class TestEnabledEvents: method test_no_conditions_same_as_allowed_events (line 634) | def test_no_conditions_same_as_allowed_events(self, campaign_machine): method test_passing_condition_returns_event (line 639) | def test_passing_condition_returns_event(self): method test_failing_condition_excludes_event (line 652) | def test_failing_condition_excludes_event(self): method test_multiple_transitions_one_passes (line 665) | def test_multiple_transitions_one_passes(self): method test_duplicate_event_across_transitions_deduplicated (line 684) | def test_duplicate_event_across_transitions_deduplicated(self): method test_final_state_returns_empty (line 705) | def test_final_state_returns_empty(self, campaign_machine): method test_kwargs_forwarded_to_conditions (line 711) | def test_kwargs_forwarded_to_conditions(self): method test_condition_exception_treated_as_enabled (line 725) | def test_condition_exception_treated_as_enabled(self): method test_mixed_enabled_and_disabled (line 740) | def test_mixed_enabled_and_disabled(self): method test_unless_condition (line 758) | def test_unless_condition(self): method test_unless_condition_passes (line 771) | def test_unless_condition_passes(self): class TestInvalidStateValueNonNone (line 785) | class TestInvalidStateValueNonNone: method test_invalid_non_none_state_value (line 788) | def test_invalid_non_none_state_value(self): class TestInitKwargsPropagation (line 805) | class TestInitKwargsPropagation: method test_kwargs_available_in_on_enter_initial (line 808) | async def test_kwargs_available_in_on_enter_initial(self, sm_runner): method test_kwargs_flow_through_eventless_transitions (line 820) | async def test_kwargs_flow_through_eventless_transitions(self, sm_runn... method test_no_kwargs_still_works (line 836) | async def test_no_kwargs_still_works(self, sm_runner): method test_multiple_kwargs (line 848) | async def test_multiple_kwargs(self, sm_runner): method test_kwargs_in_invoke_handler (line 862) | async def test_kwargs_in_invoke_handler(self, sm_runner): FILE: tests/test_statemachine_bounded_transitions.py function event_mock (line 12) | def event_mock(): function state_machine (line 17) | def state_machine(event_mock): function test_run_transition_pass_arguments_to_sub_transitions (line 42) | def test_run_transition_pass_arguments_to_sub_transitions( FILE: tests/test_statemachine_compat.py class TestStateMachineDefaults (line 27) | class TestStateMachineDefaults: method test_allow_event_without_transition (line 30) | def test_allow_event_without_transition(self): method test_enable_self_transition_entries (line 33) | def test_enable_self_transition_entries(self): method test_atomic_configuration_update (line 36) | def test_atomic_configuration_update(self): method test_catch_errors_as_events (line 39) | def test_catch_errors_as_events(self): class TestStateMachineSmoke (line 48) | class TestStateMachineSmoke: method test_create_send_and_check_state (line 51) | def test_create_send_and_check_state(self): method test_final_state_terminates (line 68) | def test_final_state_terminates(self): class TestTransitionNotAllowed (line 85) | class TestTransitionNotAllowed: method sm (line 89) | def sm(self): method test_invalid_event_raises (line 98) | def test_invalid_event_raises(self, sm): method test_event_not_available_in_current_state (line 102) | def test_event_not_available_in_current_state(self, sm): method test_condition_blocks_transition (line 107) | def test_condition_blocks_transition(self): method test_multiple_destinations_all_blocked (line 120) | def test_multiple_destinations_all_blocked(self): method test_from_any_with_cond_blocked (line 142) | def test_from_any_with_cond_blocked(self): method test_condition_algebra_any_false (line 155) | def test_condition_algebra_any_false(self): class TestTransitionNotAllowedAsync (line 175) | class TestTransitionNotAllowedAsync: method async_sm_cls (line 179) | def async_sm_cls(self): method test_async_transition_not_allowed (line 194) | async def test_async_transition_not_allowed(self, async_sm_cls): method test_sync_context_transition_not_allowed (line 200) | def test_sync_context_transition_not_allowed(self, async_sm_cls): method test_async_condition_blocks (line 205) | async def test_async_condition_blocks(self): class TestErrorOnExecutionFalse (line 226) | class TestErrorOnExecutionFalse: method test_runtime_error_in_action_propagates (line 229) | def test_runtime_error_in_action_propagates(self): method test_runtime_error_in_after_propagates (line 243) | def test_runtime_error_in_after_propagates(self): method test_async_runtime_error_in_after_propagates (line 258) | async def test_async_runtime_error_in_after_propagates(self): class TestSelfTransitionNoEntries (line 279) | class TestSelfTransitionNoEntries: method test_internal_self_transition_does_not_fire_enter_exit (line 286) | def test_internal_self_transition_does_not_fire_enter_exit(self): method test_external_self_transition_fires_enter_exit (line 306) | def test_external_self_transition_fires_enter_exit(self): class TestCurrentStateDeprecated (line 333) | class TestCurrentStateDeprecated: method test_current_state_returns_state (line 336) | def test_current_state_returns_state(self): method test_current_state_emits_warning (line 349) | def test_current_state_emits_warning(self): FILE: tests/test_statemachine_inheritance.py function BaseMachine (line 7) | def BaseMachine(): function InheritedClass (line 21) | def InheritedClass(BaseMachine): function ExtendedClass (line 29) | def ExtendedClass(BaseMachine): function OverridedClass (line 41) | def OverridedClass(BaseMachine): function OverridedTransitionClass (line 54) | def OverridedTransitionClass(BaseMachine): function test_should_inherit_states_and_transitions (line 66) | def test_should_inherit_states_and_transitions(BaseMachine, InheritedCla... function test_should_extend_states_and_transitions (line 77) | def test_should_extend_states_and_transitions(BaseMachine, ExtendedClass): function test_should_execute_transitions (line 90) | def test_should_execute_transitions(ExtendedClass): function test_dont_support_overriden_states (line 99) | def test_dont_support_overriden_states(OverridedClass): function test_support_override_transitions (line 106) | def test_support_override_transitions(OverridedTransitionClass): FILE: tests/test_threading.py function test_machine_should_allow_multi_thread_event_changes (line 10) | def test_machine_should_allow_multi_thread_event_changes(): function test_regression_443 (line 35) | def test_regression_443(): function test_regression_443_with_modifications (line 74) | def test_regression_443_with_modifications(): class TestThreadSafety (line 120) | class TestThreadSafety: method cycling_machine (line 128) | def cycling_machine(self): method test_concurrent_sends_no_lost_events (line 138) | def test_concurrent_sends_no_lost_events(self, cycling_machine, num_th... method test_concurrent_sends_state_consistency (line 167) | def test_concurrent_sends_state_consistency(self, cycling_machine): method test_concurrent_sends_with_callbacks (line 210) | def test_concurrent_sends_with_callbacks(self): method test_concurrent_send_and_read_configuration (line 257) | def test_concurrent_send_and_read_configuration(self, cycling_machine): function test_regression_443_with_modifications_for_async_engine (line 298) | async def test_regression_443_with_modifications_for_async_engine(): FILE: tests/test_transition_list.py function test_transition_list_or_operator (line 10) | def test_transition_list_or_operator(): class TestDecorators (line 32) | class TestDecorators: method test_should_assign_callback_to_transitions (line 44) | def test_should_assign_callback_to_transitions( function test_has_eventless_transition (line 68) | def test_has_eventless_transition(): function test_has_no_eventless_transition (line 77) | def test_has_no_eventless_transition(): function test_transition_list_call_with_callable (line 86) | def test_transition_list_call_with_callable(): function test_transition_list_call_with_non_callable_raises (line 98) | def test_transition_list_call_with_non_callable_raises(): FILE: tests/test_transition_table.py class TestTransitionTableMarkdown (line 12) | class TestTransitionTableMarkdown: method test_simple_table (line 15) | def test_simple_table(self): method test_with_guards (line 35) | def test_with_guards(self): method test_multiple_targets (line 49) | def test_multiple_targets(self): method test_skips_initial_transitions (line 66) | def test_skips_initial_transitions(self): method test_skips_internal_transitions (line 83) | def test_skips_internal_transitions(self): method test_targetless_transition (line 98) | def test_targetless_transition(self): class TestTransitionTableRST (line 114) | class TestTransitionTableRST: method test_rst_format (line 117) | def test_rst_format(self): method test_rst_with_guards (line 134) | def test_rst_with_guards(self): class TestTransitionTableIntegration (line 149) | class TestTransitionTableIntegration: method test_traffic_light_md (line 152) | def test_traffic_light_md(self): method test_traffic_light_rst (line 162) | def test_traffic_light_rst(self): method test_compound_state_names (line 171) | def test_compound_state_names(self): method test_default_format_is_md (line 188) | def test_default_format_is_md(self): FILE: tests/test_transitions.py function test_transition_representation (line 11) | def test_transition_representation(campaign_machine): function test_list_machine_events (line 19) | def test_list_machine_events(classic_traffic_light_machine): function test_list_state_transitions (line 25) | def test_list_state_transitions(classic_traffic_light_machine): function test_transition_should_accept_decorator_syntax (line 31) | def test_transition_should_accept_decorator_syntax(traffic_light_machine): function test_transition_as_decorator_should_call_method_before_activating_state (line 36) | def test_transition_as_decorator_should_call_method_before_activating_st... function test_cycle_transitions (line 55) | def test_cycle_transitions(request, machine_name): function test_transition_call_can_only_be_used_as_decorator (line 64) | def test_transition_call_can_only_be_used_as_decorator(): function test_transition_list_call_can_only_be_used_as_decorator (line 72) | def test_transition_list_call_can_only_be_used_as_decorator(): function transition_callback_machine (line 87) | def transition_callback_machine(request): function test_statemachine_transition_callback (line 121) | def test_statemachine_transition_callback(transition_callback_machine): function test_can_run_combined_transitions (line 128) | def test_can_run_combined_transitions(): function test_can_detect_stuck_states (line 146) | def test_can_detect_stuck_states(): function test_can_opt_out_of_stuck_states_check (line 165) | def test_can_opt_out_of_stuck_states_check(): function test_can_detect_unreachable_final_states (line 181) | def test_can_detect_unreachable_final_states(): function test_can_opt_out_of_unreachable_final_states_check (line 200) | def test_can_opt_out_of_unreachable_final_states_check(): function test_transitions_to_the_same_estate_as_itself (line 216) | def test_transitions_to_the_same_estate_as_itself(): class TestReverseTransition (line 235) | class TestReverseTransition: method test_reverse_transition (line 244) | def test_reverse_transition(self, reverse_traffic_light_machine, initi... function test_should_transition_with_a_dict_as_return (line 253) | def test_should_transition_with_a_dict_as_return(): class TestInternalTransition (line 281) | class TestInternalTransition: method test_external_self_transition_executes_state_actions (line 282) | def test_external_self_transition_executes_state_actions(self, engine): method test_internal_self_transition_skips_state_actions (line 306) | def test_internal_self_transition_skips_state_actions(self, engine): method test_should_not_allow_internal_transitions_from_distinct_states (line 332) | def test_should_not_allow_internal_transitions_from_distinct_states(se... class TestAllowEventWithoutTransition (line 344) | class TestAllowEventWithoutTransition: method test_send_unknown_event (line 345) | def test_send_unknown_event(self, classic_traffic_light_machine_allow_... method test_send_not_valid_for_the_current_state_event (line 353) | def test_send_not_valid_for_the_current_state_event( class TestTransitionFromAny (line 364) | class TestTransitionFromAny: method account_sm (line 366) | def account_sm(self): method test_transition_from_any (line 392) | def test_transition_from_any(self, account_sm): method test_can_close_from_every_state (line 397) | def test_can_close_from_every_state(self, account_sm): method test_transition_from_any_with_cond (line 408) | def test_transition_from_any_with_cond(self, account_sm): method test_any_can_be_used_as_decorator (line 415) | def test_any_can_be_used_as_decorator(self): function test_initial_transition_with_cond_raises (line 444) | def test_initial_transition_with_cond_raises(): function test_initial_transition_with_event_raises (line 452) | def test_initial_transition_with_event_raises(): FILE: tests/test_validators.py class TestValidatorPropagation (line 23) | class TestValidatorPropagation: method test_validator_rejects_with_catch_errors_as_events_true (line 26) | async def test_validator_rejects_with_catch_errors_as_events_true(self... method test_validator_rejects_with_catch_errors_as_events_false (line 36) | async def test_validator_rejects_with_catch_errors_as_events_false(sel... method test_validator_accepts (line 46) | async def test_validator_accepts(self, sm_runner): method test_state_unchanged_after_rejection (line 52) | async def test_state_unchanged_after_rejection(self, sm_runner): class TestMultipleValidators (line 65) | class TestMultipleValidators: method test_first_validator_fails (line 68) | async def test_first_validator_fails(self, sm_runner): method test_second_validator_fails (line 77) | async def test_second_validator_fails(self, sm_runner): method test_all_validators_pass (line 86) | async def test_all_validators_pass(self, sm_runner): class TestValidatorWithConditions (line 92) | class TestValidatorWithConditions: method test_validator_rejects_before_cond_is_evaluated (line 96) | async def test_validator_rejects_before_cond_is_evaluated(self, sm_run... method test_validator_passes_but_cond_rejects (line 106) | async def test_validator_passes_but_cond_rejects(self, sm_runner): method test_both_validator_and_cond_pass (line 114) | async def test_both_validator_and_cond_pass(self, sm_runner): class TestValidatorDoesNotTriggerErrorExecution (line 121) | class TestValidatorDoesNotTriggerErrorExecution: method test_validator_does_not_trigger_error_transition (line 129) | async def test_validator_does_not_trigger_error_transition(self, sm_ru... method test_action_error_does_trigger_error_transition (line 138) | async def test_action_error_does_trigger_error_transition(self, sm_run... class TestValidatorFallthrough (line 151) | class TestValidatorFallthrough: method test_validator_rejection_does_not_fallthrough (line 155) | async def test_validator_rejection_does_not_fallthrough(self, sm_runner): method test_validator_passes_takes_first_transition (line 164) | async def test_validator_passes_takes_first_transition(self, sm_runner): FILE: tests/test_weighted_transitions.py function WeightedIdleSC (line 15) | def WeightedIdleSC(): class TestWeightedTransitionsBasic (line 21) | class TestWeightedTransitionsBasic: method test_deterministic_with_seed (line 22) | def test_deterministic_with_seed(self, WeightedIdleSC): method test_statistical_distribution (line 40) | def test_statistical_distribution(self, WeightedIdleSC): method test_single_weighted_transition (line 56) | def test_single_weighted_transition(self): method test_equal_weights (line 68) | def test_equal_weights(self): method test_float_weights (line 90) | def test_float_weights(self): method test_mixed_int_and_float_weights (line 111) | def test_mixed_int_and_float_weights(self): class TestWeightedTransitionsWithGuards (line 125) | class TestWeightedTransitionsWithGuards: method test_with_user_cond_guard (line 126) | def test_with_user_cond_guard(self): method test_with_unless_guard (line 156) | def test_with_unless_guard(self): method test_guard_failure_no_fallback (line 196) | def test_guard_failure_no_fallback(self): class TestWeightedTransitionsValidation (line 231) | class TestWeightedTransitionsValidation: method test_empty_destinations (line 232) | def test_empty_destinations(self): method test_source_not_a_state (line 237) | def test_source_not_a_state(self): method test_not_a_tuple (line 241) | def test_not_a_tuple(self): method test_wrong_tuple_length (line 246) | def test_wrong_tuple_length(self): method test_target_not_a_state (line 251) | def test_target_not_a_state(self): method test_weight_not_a_number (line 256) | def test_weight_not_a_number(self): method test_weight_zero (line 262) | def test_weight_zero(self): method test_weight_negative (line 268) | def test_weight_negative(self): method test_kwargs_not_a_dict (line 274) | def test_kwargs_not_a_dict(self): method test_kwargs_forwarded_to_transition (line 280) | def test_kwargs_forwarded_to_transition(self): method test_to_helper_forwards_kwargs (line 311) | def test_to_helper_forwards_kwargs(self): method test_to_returns_tuple (line 341) | def test_to_returns_tuple(self): class TestWeightedTransitionsWithCallbacks (line 354) | class TestWeightedTransitionsWithCallbacks: method test_action_decorators_on_weighted_event (line 355) | def test_action_decorators_on_weighted_event(self): class TestWeightedTransitionsEngines (line 382) | class TestWeightedTransitionsEngines: method test_sync_and_async_engines (line 383) | async def test_sync_and_async_engines(self, sm_runner): method test_works_with_state_machine (line 398) | async def test_works_with_state_machine(self, sm_runner): class TestMultipleWeightedGroups (line 414) | class TestMultipleWeightedGroups: method test_independent_groups (line 415) | def test_independent_groups(self): class TestWeightedCondRepr (line 439) | class TestWeightedCondRepr: method test_cond_name_includes_weight_and_percentage (line 440) | def test_cond_name_includes_weight_and_percentage(self): method test_cond_name_with_fractional_percentage (line 445) | def test_cond_name_with_fractional_percentage(self): method test_non_zero_index_cond_rolls_dice_if_not_yet_selected (line 450) | def test_non_zero_index_cond_rolls_dice_if_not_yet_selected(self): FILE: tests/testcases/test_issue434.py class Model (line 9) | class Model: method __init__ (line 10) | def __init__(self, data: dict): class DataCheckerMachine (line 14) | class DataCheckerMachine(StateChart): method data_looks_good (line 30) | def data_looks_good(self): method max_cycle_reached (line 33) | def max_cycle_reached(self): method after_cycle (line 36) | def after_cycle(self, event: str, source: State, target: State): function initial_data (line 42) | def initial_data(): function data_checker_machine (line 47) | def data_checker_machine(initial_data): function test_max_cycle_without_success (line 51) | def test_max_cycle_without_success(data_checker_machine): function test_data_turns_good_mid_cycle (line 63) | def test_data_turns_good_mid_cycle(initial_data): FILE: tests/testcases/test_issue480.py class MyStateMachine (line 18) | class MyStateMachine(StateChart): method __init__ (line 24) | def __init__(self): method on_enter_state_1 (line 28) | def on_enter_state_1(self): method on_exit_state_1 (line 32) | def on_exit_state_1(self): method on_enter_state_2 (line 35) | def on_enter_state_2(self): method long_running_task (line 38) | def long_running_task(self): function test_initial_state_activation_handler (line 44) | def test_initial_state_activation_handler(): FILE: tests/testcases/test_issue509.py class Issue509SC (line 22) | class Issue509SC(StateChart): method do_nothing (line 31) | async def do_nothing(self, name): method raise_exception (line 35) | def raise_exception(self): function test_issue509_exception_routed_to_correct_caller (line 40) | async def test_issue509_exception_routed_to_correct_caller():