launch_testing.legacy.output module

launch_testing.legacy.output.create_output_lines_filter(filtered_prefixes=None, filtered_patterns=None, filtered_rmw_implementation=None)

Create a line filtering function to help output testing.

Parameters:

filtered_prefixes – A list of byte strings representing prefixes that will cause

output lines to be ignored if they start with one of the prefixes. By default lines starting with the process ID (b’pid’) and return code (b’rc’) will be ignored. :param filtered_patterns: A list of byte strings representing regexes that will cause output lines to be ignored if they match one of the regexes. :param filtered_rmw_implementation: RMW implementation for which the output will be ignored in addition to the filtered_prefixes/filtered_patterns.

launch_testing.legacy.output.create_output_lines_test(expected_lines)

Create output test given a list of expected lines.

launch_testing.legacy.output.create_output_regex_test(expected_patterns)

Create output test given a list of expected matching regular expressions.

launch_testing.legacy.output.create_output_test_from_file(output_file)

Create output test using the given file content.

Parameters:

output_file – basename (i.e. w/o extension) of either a .txt file containing the

lines to be matched or a .regex file containing patterns to be searched for.

launch_testing.legacy.output.get_default_filtered_patterns()
launch_testing.legacy.output.get_default_filtered_prefixes()
launch_testing.legacy.output.get_rmw_output_filter(rmw_implementation, filter_type)