{"action":"created","comment":{"url":"https://api.github.com/repos/ros2/examples/pulls/comments/44569400","id":44569400,"diff_hunk":"@@ -0,0 +1,74 @@\n+import io\n+import os\n+from launch import LaunchDescriptor\n+from launch.exit_handler import primary_exit_handler\n+from launch.launcher import DefaultLauncher\n+from launch.output_handler import FileOutput\n+from launch.output_handler import LineOutput\n+\n+\n+class InMemoryHandler(LineOutput):\n+    def __init__(self):\n+        super(LineOutput, self).__init__()\n+        self.left_over_stdout = b''\n+        self.left_over_stderr = b''\n+        self.stdout_data = io.BytesIO()\n+        self.stderr_data = io.BytesIO()\n+\n+    def on_stdout_lines(self, lines):\n+        self.stdout_data.write(lines)\n+\n+    def on_stderr_lines(self, lines):\n+        self.stderr_data.write(lines)\n+\n+    def get_description(self):\n+        return 'InMemoryHandler'\n+\n+\n+def setup():\n+    os.environ['OSPL_VERBOSITY'] = '8'  # 8 = OS_NONE\n+\n+\n+def test_executable():\n+    output_handler = InMemoryHandler()\n+\n+    ld = LaunchDescriptor()\n+\n+    ld.add_process(\n+        cmd=['@RCLCPP_EXAMPLES_EXECUTABLE@', 'test_executable'],\n+        name='test_executable',\n+        exit_handler=primary_exit_handler,\n+        output_handlers=[output_handler],\n+    )\n+\n+    launcher = DefaultLauncher()\n+    launcher.add_launch_descriptor(ld)\n+    rc = launcher.launch()\n+\n+    output_lines = []\n+    expected_output_lines = None\n+\n+    with open('@RCLCPP_EXAMPLES_EXPECTED_OUTPUT@', 'rb') as f:\n+        expected_output_lines = [line for line in f.read().splitlines()]","path":"rclcpp_examples/test/test_single_executable_example.py.in","position":52,"original_position":52,"commit_id":"74ae25e59bfdd6251be405fb00fe04c57e5594bc","original_commit_id":"74ae25e59bfdd6251be405fb00fe04c57e5594bc","user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"body":"Why still use a list comprehension here?","created_at":"2015-11-11T18:48:53Z","updated_at":"2015-11-11T18:48:53Z","html_url":"https://github.com/ros2/examples/pull/72#discussion_r44569400","pull_request_url":"https://api.github.com/repos/ros2/examples/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/ros2/examples/pulls/comments/44569400"},"html":{"href":"https://github.com/ros2/examples/pull/72#discussion_r44569400"},"pull_request":{"href":"https://api.github.com/repos/ros2/examples/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/ros2/examples/pulls/72","id":49907185,"html_url":"https://github.com/ros2/examples/pull/72","diff_url":"https://github.com/ros2/examples/pull/72.diff","patch_url":"https://github.com/ros2/examples/pull/72.patch","issue_url":"https://api.github.com/repos/ros2/examples/issues/72","number":72,"state":"open","locked":false,"title":"Added tests for parameter examples","user":{"login":"esteve","id":33620,"avatar_url":"https://avatars.githubusercontent.com/u/33620?v=3","gravatar_id":"","url":"https://api.github.com/users/esteve","html_url":"https://github.com/esteve","followers_url":"https://api.github.com/users/esteve/followers","following_url":"https://api.github.com/users/esteve/following{/other_user}","gists_url":"https://api.github.com/users/esteve/gists{/gist_id}","starred_url":"https://api.github.com/users/esteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esteve/subscriptions","organizations_url":"https://api.github.com/users/esteve/orgs","repos_url":"https://api.github.com/users/esteve/repos","events_url":"https://api.github.com/users/esteve/events{/privacy}","received_events_url":"https://api.github.com/users/esteve/received_events","type":"User","site_admin":false},"body":"Added tests for parameter examples\r\n\r\nConnects to ros2/ros2#143","created_at":"2015-11-06T01:52:37Z","updated_at":"2015-11-11T18:48:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b090e77926f23d5a1e3371b08d6839c3e8843b4a","assignee":{"login":"esteve","id":33620,"avatar_url":"https://avatars.githubusercontent.com/u/33620?v=3","gravatar_id":"","url":"https://api.github.com/users/esteve","html_url":"https://github.com/esteve","followers_url":"https://api.github.com/users/esteve/followers","following_url":"https://api.github.com/users/esteve/following{/other_user}","gists_url":"https://api.github.com/users/esteve/gists{/gist_id}","starred_url":"https://api.github.com/users/esteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esteve/subscriptions","organizations_url":"https://api.github.com/users/esteve/orgs","repos_url":"https://api.github.com/users/esteve/repos","events_url":"https://api.github.com/users/esteve/events{/privacy}","received_events_url":"https://api.github.com/users/esteve/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ros2/examples/pulls/72/commits","review_comments_url":"https://api.github.com/repos/ros2/examples/pulls/72/comments","review_comment_url":"https://api.github.com/repos/ros2/examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros2/examples/issues/72/comments","statuses_url":"https://api.github.com/repos/ros2/examples/statuses/74ae25e59bfdd6251be405fb00fe04c57e5594bc","head":{"label":"ros2:test-parameter-examples","ref":"test-parameter-examples","sha":"74ae25e59bfdd6251be405fb00fe04c57e5594bc","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":21909749,"name":"examples","full_name":"ros2/examples","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros2/examples","description":"Example packages for ROS2","fork":false,"url":"https://api.github.com/repos/ros2/examples","forks_url":"https://api.github.com/repos/ros2/examples/forks","keys_url":"https://api.github.com/repos/ros2/examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/examples/teams","hooks_url":"https://api.github.com/repos/ros2/examples/hooks","issue_events_url":"https://api.github.com/repos/ros2/examples/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/examples/events","assignees_url":"https://api.github.com/repos/ros2/examples/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/examples/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/examples/tags","blobs_url":"https://api.github.com/repos/ros2/examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/examples/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/examples/languages","stargazers_url":"https://api.github.com/repos/ros2/examples/stargazers","contributors_url":"https://api.github.com/repos/ros2/examples/contributors","subscribers_url":"https://api.github.com/repos/ros2/examples/subscribers","subscription_url":"https://api.github.com/repos/ros2/examples/subscription","commits_url":"https://api.github.com/repos/ros2/examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/examples/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/examples/merges","archive_url":"https://api.github.com/repos/ros2/examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/examples/downloads","issues_url":"https://api.github.com/repos/ros2/examples/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/examples/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/examples/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/examples/labels{/name}","releases_url":"https://api.github.com/repos/ros2/examples/releases{/id}","created_at":"2014-07-16T17:11:20Z","updated_at":"2015-11-05T22:01:29Z","pushed_at":"2015-11-11T18:46:02Z","git_url":"git://github.com/ros2/examples.git","ssh_url":"git@github.com:ros2/examples.git","clone_url":"https://github.com/ros2/examples.git","svn_url":"https://github.com/ros2/examples","homepage":"https://github.com/ros2/examples/wiki","size":1601,"stargazers_count":14,"watchers_count":14,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":14,"default_branch":"master"}},"base":{"label":"ros2:master","ref":"master","sha":"079ba572876ae97a067944515e789209e64cba96","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":21909749,"name":"examples","full_name":"ros2/examples","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars.githubusercontent.com/u/3979232?v=3","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros2/examples","description":"Example packages for ROS2","fork":false,"url":"https://api.github.com/repos/ros2/examples","forks_url":"https://api.github.com/repos/ros2/examples/forks","keys_url":"https://api.github.com/repos/ros2/examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/examples/teams","hooks_url":"https://api.github.com/repos/ros2/examples/hooks","issue_events_url":"https://api.github.com/repos/ros2/examples/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/examples/events","assignees_url":"https://api.github.com/repos/ros2/examples/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/examples/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/examples/tags","blobs_url":"https://api.github.com/repos/ros2/examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/examples/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/examples/languages","stargazers_url":"https://api.github.com/repos/ros2/examples/stargazers","contributors_url":"https://api.github.com/repos/ros2/examples/contributors","subscribers_url":"https://api.github.com/repos/ros2/examples/subscribers","subscription_url":"https://api.github.com/repos/ros2/examples/subscription","commits_url":"https://api.github.com/repos/ros2/examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/examples/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/examples/merges","archive_url":"https://api.github.com/repos/ros2/examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/examples/downloads","issues_url":"https://api.github.com/repos/ros2/examples/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/examples/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/examples/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/examples/labels{/name}","releases_url":"https://api.github.com/repos/ros2/examples/releases{/id}","created_at":"2014-07-16T17:11:20Z","updated_at":"2015-11-05T22:01:29Z","pushed_at":"2015-11-11T18:46:02Z","git_url":"git://github.com/ros2/examples.git","ssh_url":"git@github.com:ros2/examples.git","clone_url":"https://github.com/ros2/examples.git","svn_url":"https://github.com/ros2/examples","homepage":"https://github.com/ros2/examples/wiki","size":1601,"stargazers_count":14,"watchers_count":14,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros2/examples/pulls/72"},"html":{"href":"https://github.com/ros2/examples/pull/72"},"issue":{"href":"https://api.github.com/repos/ros2/examples/issues/72"},"comments":{"href":"https://api.github.com/repos/ros2/examples/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/ros2/examples/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/ros2/examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros2/examples/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/ros2/examples/statuses/74ae25e59bfdd6251be405fb00fe04c57e5594bc"}}}}