From 7a4e3b342e3bfc93ab54336eb1b9bac825b13b70 Mon Sep 17 00:00:00 2001 From: Joshua Morton Date: Sun, 27 Aug 2017 21:08:46 -0400 Subject: [PATCH] Add a test for an unusued node. --- test/pyrostest/test_nodes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/pyrostest/test_nodes.py b/test/pyrostest/test_nodes.py index 1e2a8ca..6bb270a 100644 --- a/test/pyrostest/test_nodes.py +++ b/test/pyrostest/test_nodes.py @@ -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') @@ -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')