Skip to content

Commit

Permalink
Add a test for an unusued node.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuamorton committed Aug 28, 2017
1 parent 6a4f2eb commit 7a4e3b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/pyrostest/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ def test_add_one_node_many(self):
sub.send(Int32(7))
assert out2.message.data == 8

@pyrostest.launch_node('pyrostest', 'add_one.py')
def test_unused_node(self):
with self.mock_pub('/pub_val', Int32, queue_size=0) as sub:
with self.check_topic('/pyrostest/add_one', Int32) as out:
pass

class TestPubFoo(pyrostest.RosTest):
@pyrostest.with_launch_file('pyrostest', 'launch.launch')
Expand All @@ -28,7 +33,6 @@ def test_foo_node(self):
with self.check_topic('/pub_val', Int32) as out:
assert out.message.data == 7


class TestSequence(pyrostest.RosTest):
@pyrostest.with_launch_file('pyrostest', 'launch.launch')
@pyrostest.launch_node('pyrostest', 'pub_foo.py')
Expand Down

0 comments on commit 7a4e3b3

Please sign in to comment.