diff --git a/rclpy/test/test_create_node.py b/rclpy/test/test_create_node.py index 76a35c6f6..944af26f1 100644 --- a/rclpy/test/test_create_node.py +++ b/rclpy/test/test_create_node.py @@ -32,24 +32,26 @@ def tearDownClass(cls): def test_create_node(self): node_name = 'create_node_test' - rclpy.create_node(node_name) + rclpy.create_node(node_name).destroy_node() def test_create_node_with_namespace(self): node_name = 'create_node_test' namespace = '/ns' - rclpy.create_node(node_name, namespace=namespace) + rclpy.create_node(node_name, namespace=namespace).destroy_node() def test_create_node_with_empty_namespace(self): node_name = 'create_node_test' namespace = '' node = rclpy.create_node(node_name, namespace=namespace) self.assertEqual('/', node.get_namespace()) + node.destroy_node() def test_create_node_with_relative_namespace(self): node_name = 'create_node_test' namespace = 'ns' node = rclpy.create_node(node_name, namespace=namespace) self.assertEqual('/ns', node.get_namespace()) + node.destroy_node() def test_create_node_invalid_name(self): node_name = 'create_node_test_invalid_name?'