diff --git a/test/pyrostest/test_nodes.py b/test/pyrostest/test_nodes.py index 1e2a8ca..e687cba 100644 --- a/test/pyrostest/test_nodes.py +++ b/test/pyrostest/test_nodes.py @@ -2,6 +2,7 @@ import pyrostest + class TestAddOne(pyrostest.RosTest): @pyrostest.launch_node('pyrostest', 'add_one.py') def test_add_one_node_single(self): @@ -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')