Ejemplo n.º 1
0
def test_launch_description_visit():
    """Test visiting entities in the LaunchDescription class."""
    ld = LaunchDescription([LaunchDescriptionEntity()])
    ld.add_action(Action())

    result = ld.visit(MockLaunchContext())
    assert isinstance(result, collections.abc.Iterable)
    for entity in result:
        assert isinstance(entity, LaunchDescriptionEntity)
Ejemplo n.º 2
0
def test_launch_description_deprecated():
    ld = LaunchDescription(deprecated_reason='DEPRECATED MESSAGE')
    ld.visit(MockLaunchContext())
    assert ld.deprecated is True
    assert ld.deprecated_reason == 'DEPRECATED MESSAGE'