launch_testing.util package
Submodules
Module contents
- launch_testing.util.KeepAliveProc()
Generate a dummy launch.actions.ExecuteProcess to keep the launch alive.
launch_test expects to shut down the launch itself when it’s done running tests. If all of the processes under test are expected to terminate on their own, it’s necessary to add another process to keep the launch service alive while the tests are running.
- exception launch_testing.util.NoMatchingProcessException
Bases:
Exception
- launch_testing.util.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.