Skip to content

Commit 417e93a

Browse files
committed
fix a new test failure due a change in how pytest represents exceptions
See: pytest-dev/pytest#5579 Signed-off-by: William Woodall <[email protected]>
1 parent fb476cf commit 417e93a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

launch/test/launch/actions/test_include_launch_description.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_include_launch_description_launch_arguments():
110110
lc2 = LaunchContext()
111111
with pytest.raises(RuntimeError) as excinfo2:
112112
action2.visit(lc2)
113-
assert 'Included launch description missing required argument' in str(excinfo2)
113+
assert 'Included launch description missing required argument' in str(excinfo2.value)
114114

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

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

0 commit comments

Comments
 (0)