{"action":"created","comment":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments/158135438","pull_request_review_id":84895728,"id":158135438,"diff_hunk":"@@ -0,0 +1,70 @@\n+import unittest\n+\n+from avocado.core import tree\n+\n+\n+class TreeNode(unittest.TestCase):\n+\n+    def test_empty(self):\n+        node = tree.TreeNode()\n+        self.assertEqual(node.name, '')\n+        self.assertEqual(node.value, {})\n+        self.assertEqual(node.children, [])\n+\n+    def test_parents_child(self):\n+        child = tree.TreeNode()\n+        parent = tree.TreeNode(children=[child])\n+        self.assertIn(child, parent.children)\n+\n+    def test_childs_parent(self):\n+        child = tree.TreeNode()\n+        parent = tree.TreeNode(children=[child])\n+        self.assertIs(child.parent, parent)\n+\n+    def test_children_order(self):\n+        huey = tree.TreeNode(name='Huey')\n+        dewey = tree.TreeNode(name='Dewey')\n+        louie = tree.TreeNode(name='Louie')\n+        scrooge = tree.TreeNode(name='Scrooge',\n+                                children=[huey, dewey, louie])\n+        self.assertIs(scrooge.children[0], huey)\n+        self.assertIs(scrooge.children[1], dewey)\n+        self.assertIs(scrooge.children[2], louie)\n+\n+    def test_eq_name(self):\n+        original = tree.TreeNode(name='same')\n+        clone = tree.TreeNode(name='same')\n+        self.assertEqual(original, clone)\n+        self.assertNotEqual(original,\n+                            tree.TreeNode(name='other'))\n+\n+    def test_eq_name_str(self):\n+        original = tree.TreeNode(name='same')\n+        self.assertEqual(original, 'same')\n+        self.assertNotEqual(original, 'other')\n+\n+    def test_eq_children(self):\n+        huey = tree.TreeNode(name='Huey')\n+        dewey = tree.TreeNode(name='Dewey')\n+        louie = tree.TreeNode(name='Louie')\n+        original = tree.TreeNode(children=[huey, dewey, louie])\n+        clone = tree.TreeNode(children=[huey, dewey, louie])\n+        self.assertEqual(original, clone)\n+        self.assertNotEqual(original, tree.TreeNode(children=[huey, dewey]))","path":"selftests/unit/test_tree.py","position":53,"original_position":53,"commit_id":"b97d040f67ccecfa9361b9867fddaa564d5d72bc","original_commit_id":"b97d040f67ccecfa9361b9867fddaa564d5d72bc","user":{"login":"lmr","id":296807,"avatar_url":"https://avatars1.githubusercontent.com/u/296807?v=4","gravatar_id":"","url":"https://api.github.com/users/lmr","html_url":"https://github.com/lmr","followers_url":"https://api.github.com/users/lmr/followers","following_url":"https://api.github.com/users/lmr/following{/other_user}","gists_url":"https://api.github.com/users/lmr/gists{/gist_id}","starred_url":"https://api.github.com/users/lmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmr/subscriptions","organizations_url":"https://api.github.com/users/lmr/orgs","repos_url":"https://api.github.com/users/lmr/repos","events_url":"https://api.github.com/users/lmr/events{/privacy}","received_events_url":"https://api.github.com/users/lmr/received_events","type":"User","site_admin":false},"body":"OK","created_at":"2017-12-20T21:05:51Z","updated_at":"2017-12-20T21:07:46Z","html_url":"https://github.com/avocado-framework/avocado/pull/2362#discussion_r158135438","pull_request_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments/158135438"},"html":{"href":"https://github.com/avocado-framework/avocado/pull/2362#discussion_r158135438"},"pull_request":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362"}}},"pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362","id":158619039,"html_url":"https://github.com/avocado-framework/avocado/pull/2362","diff_url":"https://github.com/avocado-framework/avocado/pull/2362.diff","patch_url":"https://github.com/avocado-framework/avocado/pull/2362.patch","issue_url":"https://api.github.com/repos/avocado-framework/avocado/issues/2362","number":2362,"state":"open","locked":false,"title":"Tree: docs and tests","user":{"login":"clebergnu","id":447178,"avatar_url":"https://avatars1.githubusercontent.com/u/447178?v=4","gravatar_id":"","url":"https://api.github.com/users/clebergnu","html_url":"https://github.com/clebergnu","followers_url":"https://api.github.com/users/clebergnu/followers","following_url":"https://api.github.com/users/clebergnu/following{/other_user}","gists_url":"https://api.github.com/users/clebergnu/gists{/gist_id}","starred_url":"https://api.github.com/users/clebergnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebergnu/subscriptions","organizations_url":"https://api.github.com/users/clebergnu/orgs","repos_url":"https://api.github.com/users/clebergnu/repos","events_url":"https://api.github.com/users/clebergnu/events{/privacy}","received_events_url":"https://api.github.com/users/clebergnu/received_events","type":"User","site_admin":false},"body":"The `avocado.core.tree` module is the foundation to a lot of important functionality in Avocado, including parameters and the yaml_to_mux implementation of the variants interface.\r\n\r\nThis adds documentation and tests to the `TreeNode` class.","created_at":"2017-12-15T14:44:25Z","updated_at":"2017-12-20T21:07:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6b66be4dc7c8f8e284a7ad2d5a6b5bffdc9fd25","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362/commits","review_comments_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362/comments","review_comment_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments{/number}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/issues/2362/comments","statuses_url":"https://api.github.com/repos/avocado-framework/avocado/statuses/b97d040f67ccecfa9361b9867fddaa564d5d72bc","head":{"label":"clebergnu:tree_docs_tests","ref":"tree_docs_tests","sha":"b97d040f67ccecfa9361b9867fddaa564d5d72bc","user":{"login":"clebergnu","id":447178,"avatar_url":"https://avatars1.githubusercontent.com/u/447178?v=4","gravatar_id":"","url":"https://api.github.com/users/clebergnu","html_url":"https://github.com/clebergnu","followers_url":"https://api.github.com/users/clebergnu/followers","following_url":"https://api.github.com/users/clebergnu/following{/other_user}","gists_url":"https://api.github.com/users/clebergnu/gists{/gist_id}","starred_url":"https://api.github.com/users/clebergnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebergnu/subscriptions","organizations_url":"https://api.github.com/users/clebergnu/orgs","repos_url":"https://api.github.com/users/clebergnu/repos","events_url":"https://api.github.com/users/clebergnu/events{/privacy}","received_events_url":"https://api.github.com/users/clebergnu/received_events","type":"User","site_admin":false},"repo":{"id":17944017,"name":"avocado","full_name":"clebergnu/avocado","owner":{"login":"clebergnu","id":447178,"avatar_url":"https://avatars1.githubusercontent.com/u/447178?v=4","gravatar_id":"","url":"https://api.github.com/users/clebergnu","html_url":"https://github.com/clebergnu","followers_url":"https://api.github.com/users/clebergnu/followers","following_url":"https://api.github.com/users/clebergnu/following{/other_user}","gists_url":"https://api.github.com/users/clebergnu/gists{/gist_id}","starred_url":"https://api.github.com/users/clebergnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebergnu/subscriptions","organizations_url":"https://api.github.com/users/clebergnu/orgs","repos_url":"https://api.github.com/users/clebergnu/repos","events_url":"https://api.github.com/users/clebergnu/events{/privacy}","received_events_url":"https://api.github.com/users/clebergnu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clebergnu/avocado","description":"Avocado Test Runner","fork":true,"url":"https://api.github.com/repos/clebergnu/avocado","forks_url":"https://api.github.com/repos/clebergnu/avocado/forks","keys_url":"https://api.github.com/repos/clebergnu/avocado/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clebergnu/avocado/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clebergnu/avocado/teams","hooks_url":"https://api.github.com/repos/clebergnu/avocado/hooks","issue_events_url":"https://api.github.com/repos/clebergnu/avocado/issues/events{/number}","events_url":"https://api.github.com/repos/clebergnu/avocado/events","assignees_url":"https://api.github.com/repos/clebergnu/avocado/assignees{/user}","branches_url":"https://api.github.com/repos/clebergnu/avocado/branches{/branch}","tags_url":"https://api.github.com/repos/clebergnu/avocado/tags","blobs_url":"https://api.github.com/repos/clebergnu/avocado/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clebergnu/avocado/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clebergnu/avocado/git/refs{/sha}","trees_url":"https://api.github.com/repos/clebergnu/avocado/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clebergnu/avocado/statuses/{sha}","languages_url":"https://api.github.com/repos/clebergnu/avocado/languages","stargazers_url":"https://api.github.com/repos/clebergnu/avocado/stargazers","contributors_url":"https://api.github.com/repos/clebergnu/avocado/contributors","subscribers_url":"https://api.github.com/repos/clebergnu/avocado/subscribers","subscription_url":"https://api.github.com/repos/clebergnu/avocado/subscription","commits_url":"https://api.github.com/repos/clebergnu/avocado/commits{/sha}","git_commits_url":"https://api.github.com/repos/clebergnu/avocado/git/commits{/sha}","comments_url":"https://api.github.com/repos/clebergnu/avocado/comments{/number}","issue_comment_url":"https://api.github.com/repos/clebergnu/avocado/issues/comments{/number}","contents_url":"https://api.github.com/repos/clebergnu/avocado/contents/{+path}","compare_url":"https://api.github.com/repos/clebergnu/avocado/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clebergnu/avocado/merges","archive_url":"https://api.github.com/repos/clebergnu/avocado/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clebergnu/avocado/downloads","issues_url":"https://api.github.com/repos/clebergnu/avocado/issues{/number}","pulls_url":"https://api.github.com/repos/clebergnu/avocado/pulls{/number}","milestones_url":"https://api.github.com/repos/clebergnu/avocado/milestones{/number}","notifications_url":"https://api.github.com/repos/clebergnu/avocado/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clebergnu/avocado/labels{/name}","releases_url":"https://api.github.com/repos/clebergnu/avocado/releases{/id}","deployments_url":"https://api.github.com/repos/clebergnu/avocado/deployments","created_at":"2014-03-20T13:42:05Z","updated_at":"2017-03-14T20:16:34Z","pushed_at":"2017-12-20T19:15:41Z","git_url":"git://github.com/clebergnu/avocado.git","ssh_url":"git@github.com:clebergnu/avocado.git","clone_url":"https://github.com/clebergnu/avocado.git","svn_url":"https://github.com/clebergnu/avocado","homepage":"","size":11862,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"avocado-framework:master","ref":"master","sha":"435a09ab849aa7a4f4c8e1dc11b24aac024a16bf","user":{"login":"avocado-framework","id":7245719,"avatar_url":"https://avatars3.githubusercontent.com/u/7245719?v=4","gravatar_id":"","url":"https://api.github.com/users/avocado-framework","html_url":"https://github.com/avocado-framework","followers_url":"https://api.github.com/users/avocado-framework/followers","following_url":"https://api.github.com/users/avocado-framework/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework/orgs","repos_url":"https://api.github.com/users/avocado-framework/repos","events_url":"https://api.github.com/users/avocado-framework/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":17449498,"name":"avocado","full_name":"avocado-framework/avocado","owner":{"login":"avocado-framework","id":7245719,"avatar_url":"https://avatars3.githubusercontent.com/u/7245719?v=4","gravatar_id":"","url":"https://api.github.com/users/avocado-framework","html_url":"https://github.com/avocado-framework","followers_url":"https://api.github.com/users/avocado-framework/followers","following_url":"https://api.github.com/users/avocado-framework/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework/orgs","repos_url":"https://api.github.com/users/avocado-framework/repos","events_url":"https://api.github.com/users/avocado-framework/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/avocado-framework/avocado","description":"Avocado Test Framework","fork":false,"url":"https://api.github.com/repos/avocado-framework/avocado","forks_url":"https://api.github.com/repos/avocado-framework/avocado/forks","keys_url":"https://api.github.com/repos/avocado-framework/avocado/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avocado-framework/avocado/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avocado-framework/avocado/teams","hooks_url":"https://api.github.com/repos/avocado-framework/avocado/hooks","issue_events_url":"https://api.github.com/repos/avocado-framework/avocado/issues/events{/number}","events_url":"https://api.github.com/repos/avocado-framework/avocado/events","assignees_url":"https://api.github.com/repos/avocado-framework/avocado/assignees{/user}","branches_url":"https://api.github.com/repos/avocado-framework/avocado/branches{/branch}","tags_url":"https://api.github.com/repos/avocado-framework/avocado/tags","blobs_url":"https://api.github.com/repos/avocado-framework/avocado/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avocado-framework/avocado/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avocado-framework/avocado/git/refs{/sha}","trees_url":"https://api.github.com/repos/avocado-framework/avocado/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avocado-framework/avocado/statuses/{sha}","languages_url":"https://api.github.com/repos/avocado-framework/avocado/languages","stargazers_url":"https://api.github.com/repos/avocado-framework/avocado/stargazers","contributors_url":"https://api.github.com/repos/avocado-framework/avocado/contributors","subscribers_url":"https://api.github.com/repos/avocado-framework/avocado/subscribers","subscription_url":"https://api.github.com/repos/avocado-framework/avocado/subscription","commits_url":"https://api.github.com/repos/avocado-framework/avocado/commits{/sha}","git_commits_url":"https://api.github.com/repos/avocado-framework/avocado/git/commits{/sha}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/comments{/number}","issue_comment_url":"https://api.github.com/repos/avocado-framework/avocado/issues/comments{/number}","contents_url":"https://api.github.com/repos/avocado-framework/avocado/contents/{+path}","compare_url":"https://api.github.com/repos/avocado-framework/avocado/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avocado-framework/avocado/merges","archive_url":"https://api.github.com/repos/avocado-framework/avocado/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avocado-framework/avocado/downloads","issues_url":"https://api.github.com/repos/avocado-framework/avocado/issues{/number}","pulls_url":"https://api.github.com/repos/avocado-framework/avocado/pulls{/number}","milestones_url":"https://api.github.com/repos/avocado-framework/avocado/milestones{/number}","notifications_url":"https://api.github.com/repos/avocado-framework/avocado/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avocado-framework/avocado/labels{/name}","releases_url":"https://api.github.com/repos/avocado-framework/avocado/releases{/id}","deployments_url":"https://api.github.com/repos/avocado-framework/avocado/deployments","created_at":"2014-03-05T17:52:27Z","updated_at":"2017-12-15T20:42:18Z","pushed_at":"2017-12-20T19:15:43Z","git_url":"git://github.com/avocado-framework/avocado.git","ssh_url":"git@github.com:avocado-framework/avocado.git","clone_url":"https://github.com/avocado-framework/avocado.git","svn_url":"https://github.com/avocado-framework/avocado","homepage":"http://avocado-framework.github.io/","size":11651,"stargazers_count":129,"watchers_count":129,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":149,"open_issues":35,"watchers":129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362"},"html":{"href":"https://github.com/avocado-framework/avocado/pull/2362"},"issue":{"href":"https://api.github.com/repos/avocado-framework/avocado/issues/2362"},"comments":{"href":"https://api.github.com/repos/avocado-framework/avocado/issues/2362/comments"},"review_comments":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362/comments"},"review_comment":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/2362/commits"},"statuses":{"href":"https://api.github.com/repos/avocado-framework/avocado/statuses/b97d040f67ccecfa9361b9867fddaa564d5d72bc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lmr"}}