Skip to content

Commit

Permalink
Merge pull request #26 from gtagency/unused-node
Browse files Browse the repository at this point in the history
Add a test for an unused node.
  • Loading branch information
chsahit authored Sep 13, 2017
2 parents 180eafc + efcb19f commit 5667b25
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/pyrostest/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pyrostest


class TestAddOne(pyrostest.RosTest):
@pyrostest.launch_node('pyrostest', 'add_one.py')
def test_add_one_node_single(self):
Expand All @@ -20,6 +21,12 @@ 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 Down

0 comments on commit 5667b25

Please sign in to comment.