launch_testing.util.proc_lookup module

exception launch_testing.util.proc_lookup.NoMatchingProcessException

Bases: Exception

launch_testing.util.proc_lookup.resolveProcesses(info_obj, *, process=None, cmd_args=None, strict_proc_matching=True)

Resolve a process name and cmd arguments to one or more launch.actions.ExecuteProcess.

Parameters:
  • info_obj – a ProcInfoHandler or an IoHandler that contains processes that could match

  • process (A launch.actions.ExecuteProcess object to match a specific process, or a string) – One or more processes to match. Pass None to match all processes

to search by process name

Parameters:

cmd_args – Optional. If the process param is a string, the cmd_args will be used to

disambiguate processes with the same name. cmd_args=None will match all command arguments. cmd_args=launch_testing.asserts.NO_CMD_ARGS will match a process without command-line arguments

Parameters:

strict_proc_matching – Optional. If the process param is a string and matches multiple

processes, strict_proc_matching=True will raise an error

Returns:

A list of one or more matching processes taken from the info_obj. If no processes

in info_obj match, a NoMatchingProcessException will be raised.