launch_testing package
Subpackages
- launch_testing.actions package
- launch_testing.asserts package
- launch_testing.event_handlers package
- launch_testing.legacy package
- launch_testing.pytest package
- launch_testing.tools package
- launch_testing.util package
Submodules
- launch_testing.decorator module
- launch_testing.io_handler module
- launch_testing.junitxml module
- launch_testing.launch_test module
- launch_testing.loader module
- launch_testing.markers module
- launch_testing.parametrize module
- launch_testing.parse_arguments module
- launch_testing.print_arguments module
- launch_testing.proc_info_handler module
- launch_testing.ready_aggregator module
- launch_testing.test_result module
- launch_testing.test_runner module
Module contents
- class launch_testing.ActiveIoHandler
Bases:
object
Holds stdout captured from running processes.
The ActiveIoHandler is meant to be used when capturing is still in progress and provides additional synchronization, as well as methods to wait on incoming IO
- append(process_io)
- assertWaitFor(*args, **kwargs)
- property io_event
- process_names()
Get the name of all unique processes that generated IO.
- Returns [string]:
- processes()
Get an iterable of unique launch.events.process.RunningProcessEvent objects.
- Returns [launch.actions.ExecuteProcess]:
- track(process_name)
- waitFor(expected_output, process=None, cmd_args=None, *, strict_proc_matching=True, output_filter=None, timeout=10, strip_ansi_escape_sequences=True, stream='stderr')
- class launch_testing.ActiveProcInfoHandler
Bases:
object
Allows tests to wait on process termination before proceeding.
- append(process_info)
- assertWaitForShutdown(process, cmd_args=None, *, timeout=10)
- assertWaitForStartup(process, cmd_args=None, *, timeout=10)
- property proc_event
- process_names()
Get the name of all recorded processes.
- Returns [string]:
- processes()
Get the ExecuteProcess launch actions of all recorded processes.
- Returns [launch.actions.ExecuteProcess]:
- class launch_testing.IoHandler
Bases:
object
Holds stdout captured from running processes.
This class provides helper methods to enumerate the captured IO by individual processes
- append(process_io)
- process_names()
Get the name of all unique processes that generated IO.
- Returns [string]:
- processes()
Get an iterable of unique launch.events.process.RunningProcessEvent objects.
- Returns [launch.actions.ExecuteProcess]:
- track(process_name)
- class launch_testing.ProcInfoHandler
Bases:
object
Captures exit codes from processes when they terminate.
- append(process_info)
- process_names()
Get the name of all recorded processes.
- processes()
Get the ExecuteProcess launch actions of all recorded processes.
- class launch_testing.ReadyAggregator(ready_fn, num_to_aggregate)
Bases:
object
Calls a ready_fn parent function on the nth call to a child function.
- ready_fn()
- launch_testing.parametrize(argnames, argvalues)
Decorate a test launch description in a way that causes it to run with specified parameters.
This decorator behaves like the @pytest.mark.parametrize decorator.
- Param:
argnames A comma separated list of argument names.
- Param:
argvalues The values to use for arguments specified in argnames
- launch_testing.post_shutdown_test()
Decorate tests that are meant to run after process shutdown.