Пример #1
0
def test_cli_extension_for_smoke(tmp_path, capsys):
    # NOTE(hidmic): pytest and empy do not play along,
    # the latter expects some proxy will stay in sys.stdout
    # and the former insists in overwriting it
    interface_files = [TEST_DIR + ':msg/Test.msg']

    with capsys.disabled():  # so do everything in one run
        # Passing target typesupport implementations explictly
        ts = 'cpp[typesupport_implementations:{}]'.format(
            list(get_resources('rosidl_typesupport_cpp'))
        )
        generate(
            package_name='rosidl_typesupport_cpp',
            interface_files=interface_files,
            typesupports=[ts],
            output_path=tmp_path / 'explicit_args'
        )

        # Using default typesupport implementations
        generate(
            package_name='rosidl_typesupport_cpp',
            interface_files=interface_files,
            typesupports=['cpp'],
            output_path=tmp_path / 'defaults'
        )
def test_cli_extension_for_smoke(tmp_path):
    assert len(
        generate(package_name='rosidl_typesupport_fastrtps_cpp',
                 interface_files=[TEST_DIR + ':msg/Test.msg'],
                 typesupports=['fastrtps_cpp'],
                 output_path=tmp_path)) > 0
Пример #3
0
def test_cli_extension_for_smoke(tmp_path):
    generate(package_name='rosidl_generator_py',
             interface_files=[PACKAGE_DIR + ':msg/StringArrays.msg'],
             types=['py'],
             output_path=tmp_path)