py_trees.tests module

Library of common methods for the tests.

Oh my spaghettified magnificence, Bless my noggin with a tickle from your noodly appendages!

py_trees.tests.clear_blackboard() None

Clear the blackboard, useful between tests.

py_trees.tests.pre_tick_visitor(behaviour_tree: BehaviourTree) None

Tree tick banner.

Args:

behavior_tree: unused

py_trees.tests.print_assert_banner() None

Print an assertion banner on stdout to indicate asserts will ensue.

py_trees.tests.print_assert_details(text: str, expected: AssertResultType, result: AssertResultType) None

Pretty print the expected and actual results for an assertion.

Args:

text: human readable info about the assertion expected: expected result result: actual result

py_trees.tests.print_summary(nodes: List[Behaviour]) None

Print status details for a list of behaviours.

Args:

nodes: a list of behaviours to print information about.

py_trees.tests.tick_tree(root: Behaviour, from_tick: int, to_tick: int, *, visitors: List[VisitorBase] | None = None, print_snapshot: bool = False, print_blackboard: bool = False) None

Tick the tree for a specified # ticks and run a variety of debugging helpers.

Args:

root: the root of the tree to tick from from_tick: needed only to help provide accurate stdout information to_tick: with from_tick, used to determine the # ticks required visitors: a list of visitors to run on each tree tick print_snapshot: print ascii/unicode snapshots after each tick print_blackboard: display the blackboard and it’s update after each tick