Skip to content

Commit

Permalink
fix a new test failure due a change in how pytest represents exceptions
Browse files Browse the repository at this point in the history
See: pytest-dev/pytest#5579

Signed-off-by: William Woodall <william@osrfoundation.org>
  • Loading branch information
wjwwood committed Jul 24, 2019
1 parent 66930f0 commit 7b13334
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions launch/test/launch/actions/test_include_launch_description.py
Expand Up @@ -110,7 +110,7 @@ def test_include_launch_description_launch_arguments():
lc2 = LaunchContext()
with pytest.raises(RuntimeError) as excinfo2:
action2.visit(lc2)
assert 'Included launch description missing required argument' in str(excinfo2)
assert 'Included launch description missing required argument' in str(excinfo2.value)

# test that a declared argument that is not provided raises an error, but with other args set
ld2 = LaunchDescription([DeclareLaunchArgument('foo')])
Expand All @@ -121,8 +121,8 @@ def test_include_launch_description_launch_arguments():
lc2 = LaunchContext()
with pytest.raises(RuntimeError) as excinfo2:
action2.visit(lc2)
assert 'Included launch description missing required argument' in str(excinfo2)
assert 'not_foo' in str(excinfo2)
assert 'Included launch description missing required argument' in str(excinfo2.value)
assert 'not_foo' in str(excinfo2.value)

# test that a declared argument with a default value that is not provided does not raise
ld2 = LaunchDescription([DeclareLaunchArgument('foo', default_value='FOO')])
Expand Down

0 comments on commit 7b13334

Please sign in to comment.