{"action":"created","comment":{"url":"https://api.github.com/repos/vbenavente/data-structures/pulls/comments/75409180","id":75409180,"diff_hunk":"@@ -0,0 +1,95 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"File tests LinkedList functionality.\"\"\"\n+from __future__ import unicode_literals\n+import pytest\n+from linked_list import LinkedList\n+\n+TEST_LINKED_LIST_INIT_DATA = [\n+    (\"frog\", 'g'),\n+    ([\"one\", \"two\", \"three\"], \"three\")\n+]\n+TEST_PUSH_DATA = [\n+    (\"taco\", \"burrito\", \"burrito\"),\n+    (\"a\", \"b\", \"b\"),\n+    (\"cat\", \"dog\", \"dog\"),\n+    (\"z\", [1, 2, 3], [1, 2, 3])\n+]\n+TEST_POP_DATA = [\n+    (\"zebra\", \"a\"),\n+    (\"encyclopedia\", \"a\"),\n+    ([1, 3, 5], 5)\n+]\n+TEST_SIZE_DATA = [\n+    (\"taco\", 4),\n+    ([1, 2, 3], 3)\n+]\n+TEST_SEARCH_DATA = [\n+    (\"string\", \"i\", \"i\"),\n+    ([1, 2, 7, 8], 8, 8)\n+]\n+TEST_REMOVE_DATA = [\n+    (\"encyclopedia\", \"i\", \"i\"),\n+    (\"zebrasarecool\", \"b\", \"b\"),\n+]\n+TEST_DISPLAY = [\n+    (\"zebra\", \"(a, r, b, e, z)\"),\n+    ([1, 2, 3], \"(3, 2, 1)\")\n+]\n+\n+\n+@pytest.mark.parametrize(\"data, output\", TEST_LINKED_LIST_INIT_DATA)\n+def test_linked_list_init(data, output):\n+    \"\"\"Test the __init__ of LinkedList class.\"\"\"\n+    test_case = LinkedList(data)\n+    assert test_case.head.data == output\n+\n+\n+@pytest.mark.parametrize(\"data, data2, output\", TEST_PUSH_DATA)\n+def test_push(data, data2, output):\n+    \"\"\"Test the push method of LinkedList class.\"\"\"\n+    test_case = LinkedList(data)\n+    test_case.push(data2)\n+    assert test_case.head.data == output\n+\n+\n+@pytest.mark.parametrize(\"data, output\", TEST_POP_DATA)\n+def test_pop(data, output):\n+    \"\"\"Test the pop method of LinkedList class.\"\"\"\n+    test_case = LinkedList(data)\n+    assert test_case.pop().data == output\n+\n+\n+@pytest.mark.parametrize(\"data, output\", TEST_SIZE_DATA)\n+def test_size(data, output):\n+    \"\"\"Test the size method of LinkedList class.\"\"\"\n+    test_case = LinkedList(data)\n+    assert test_case.size() == output\n+\n+\n+@pytest.mark.parametrize(\"data, output\", TEST_SIZE_DATA)\n+def test_dunder_len(data, output):\n+    \"\"\"Test the dunder len method of LinkedList class.\"\"\"\n+    test_case = LinkedList(data)\n+    assert len(test_case) == output\n+\n+\n+@pytest.mark.parametrize(\"initial, query, output\", TEST_SEARCH_DATA)\n+def test_search(initial, query, output):\n+    \"\"\"Test the search method of LinkedList with test data.\"\"\"\n+    test_case = LinkedList(initial)\n+    assert test_case.search(query).data == output","path":"src/test_linked_list.py","position":80,"original_position":80,"commit_id":"6a628c772900eba125a99cdc77fa319de003c1a5","original_commit_id":"6a628c772900eba125a99cdc77fa319de003c1a5","user":{"login":"cewing","id":417109,"avatar_url":"https://avatars.githubusercontent.com/u/417109?v=3","gravatar_id":"","url":"https://api.github.com/users/cewing","html_url":"https://github.com/cewing","followers_url":"https://api.github.com/users/cewing/followers","following_url":"https://api.github.com/users/cewing/following{/other_user}","gists_url":"https://api.github.com/users/cewing/gists{/gist_id}","starred_url":"https://api.github.com/users/cewing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cewing/subscriptions","organizations_url":"https://api.github.com/users/cewing/orgs","repos_url":"https://api.github.com/users/cewing/repos","events_url":"https://api.github.com/users/cewing/events{/privacy}","received_events_url":"https://api.github.com/users/cewing/received_events","type":"User","site_admin":false},"body":"what about searching for something that isn't there?","created_at":"2016-08-18T23:48:51Z","updated_at":"2016-08-18T23:48:51Z","html_url":"https://github.com/vbenavente/data-structures/pull/1#discussion_r75409180","pull_request_url":"https://api.github.com/repos/vbenavente/data-structures/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/vbenavente/data-structures/pulls/comments/75409180"},"html":{"href":"https://github.com/vbenavente/data-structures/pull/1#discussion_r75409180"},"pull_request":{"href":"https://api.github.com/repos/vbenavente/data-structures/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/vbenavente/data-structures/pulls/1","id":81737713,"html_url":"https://github.com/vbenavente/data-structures/pull/1","diff_url":"https://github.com/vbenavente/data-structures/pull/1.diff","patch_url":"https://github.com/vbenavente/data-structures/pull/1.patch","issue_url":"https://api.github.com/repos/vbenavente/data-structures/issues/1","number":1,"state":"closed","locked":false,"title":"Linked list","user":{"login":"derekmhewitt","id":19866888,"avatar_url":"https://avatars.githubusercontent.com/u/19866888?v=3","gravatar_id":"","url":"https://api.github.com/users/derekmhewitt","html_url":"https://github.com/derekmhewitt","followers_url":"https://api.github.com/users/derekmhewitt/followers","following_url":"https://api.github.com/users/derekmhewitt/following{/other_user}","gists_url":"https://api.github.com/users/derekmhewitt/gists{/gist_id}","starred_url":"https://api.github.com/users/derekmhewitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekmhewitt/subscriptions","organizations_url":"https://api.github.com/users/derekmhewitt/orgs","repos_url":"https://api.github.com/users/derekmhewitt/repos","events_url":"https://api.github.com/users/derekmhewitt/events{/privacy}","received_events_url":"https://api.github.com/users/derekmhewitt/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-18T00:02:32Z","updated_at":"2016-08-18T23:48:51Z","closed_at":"2016-08-18T20:27:40Z","merged_at":"2016-08-18T20:27:40Z","merge_commit_sha":"30766f773bad45fb9ee6236badffd36d9e88114f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vbenavente/data-structures/pulls/1/commits","review_comments_url":"https://api.github.com/repos/vbenavente/data-structures/pulls/1/comments","review_comment_url":"https://api.github.com/repos/vbenavente/data-structures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vbenavente/data-structures/issues/1/comments","statuses_url":"https://api.github.com/repos/vbenavente/data-structures/statuses/6a628c772900eba125a99cdc77fa319de003c1a5","head":{"label":"vbenavente:linked_list","ref":"linked_list","sha":"6a628c772900eba125a99cdc77fa319de003c1a5","user":{"login":"vbenavente","id":15848808,"avatar_url":"https://avatars.githubusercontent.com/u/15848808?v=3","gravatar_id":"","url":"https://api.github.com/users/vbenavente","html_url":"https://github.com/vbenavente","followers_url":"https://api.github.com/users/vbenavente/followers","following_url":"https://api.github.com/users/vbenavente/following{/other_user}","gists_url":"https://api.github.com/users/vbenavente/gists{/gist_id}","starred_url":"https://api.github.com/users/vbenavente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbenavente/subscriptions","organizations_url":"https://api.github.com/users/vbenavente/orgs","repos_url":"https://api.github.com/users/vbenavente/repos","events_url":"https://api.github.com/users/vbenavente/events{/privacy}","received_events_url":"https://api.github.com/users/vbenavente/received_events","type":"User","site_admin":false},"repo":{"id":65763398,"name":"data-structures","full_name":"vbenavente/data-structures","owner":{"login":"vbenavente","id":15848808,"avatar_url":"https://avatars.githubusercontent.com/u/15848808?v=3","gravatar_id":"","url":"https://api.github.com/users/vbenavente","html_url":"https://github.com/vbenavente","followers_url":"https://api.github.com/users/vbenavente/followers","following_url":"https://api.github.com/users/vbenavente/following{/other_user}","gists_url":"https://api.github.com/users/vbenavente/gists{/gist_id}","starred_url":"https://api.github.com/users/vbenavente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbenavente/subscriptions","organizations_url":"https://api.github.com/users/vbenavente/orgs","repos_url":"https://api.github.com/users/vbenavente/repos","events_url":"https://api.github.com/users/vbenavente/events{/privacy}","received_events_url":"https://api.github.com/users/vbenavente/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vbenavente/data-structures","description":null,"fork":false,"url":"https://api.github.com/repos/vbenavente/data-structures","forks_url":"https://api.github.com/repos/vbenavente/data-structures/forks","keys_url":"https://api.github.com/repos/vbenavente/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vbenavente/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vbenavente/data-structures/teams","hooks_url":"https://api.github.com/repos/vbenavente/data-structures/hooks","issue_events_url":"https://api.github.com/repos/vbenavente/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/vbenavente/data-structures/events","assignees_url":"https://api.github.com/repos/vbenavente/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/vbenavente/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/vbenavente/data-structures/tags","blobs_url":"https://api.github.com/repos/vbenavente/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vbenavente/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vbenavente/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/vbenavente/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vbenavente/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/vbenavente/data-structures/languages","stargazers_url":"https://api.github.com/repos/vbenavente/data-structures/stargazers","contributors_url":"https://api.github.com/repos/vbenavente/data-structures/contributors","subscribers_url":"https://api.github.com/repos/vbenavente/data-structures/subscribers","subscription_url":"https://api.github.com/repos/vbenavente/data-structures/subscription","commits_url":"https://api.github.com/repos/vbenavente/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/vbenavente/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/vbenavente/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/vbenavente/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/vbenavente/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/vbenavente/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vbenavente/data-structures/merges","archive_url":"https://api.github.com/repos/vbenavente/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vbenavente/data-structures/downloads","issues_url":"https://api.github.com/repos/vbenavente/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/vbenavente/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/vbenavente/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/vbenavente/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vbenavente/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/vbenavente/data-structures/releases{/id}","deployments_url":"https://api.github.com/repos/vbenavente/data-structures/deployments","created_at":"2016-08-15T20:38:26Z","updated_at":"2016-08-18T20:27:42Z","pushed_at":"2016-08-18T21:10:26Z","git_url":"git://github.com/vbenavente/data-structures.git","ssh_url":"git@github.com:vbenavente/data-structures.git","clone_url":"https://github.com/vbenavente/data-structures.git","svn_url":"https://github.com/vbenavente/data-structures","homepage":null,"size":13,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"vbenavente:master","ref":"master","sha":"f5d42c3a27c26289b861b7700c26114fcb992e89","user":{"login":"vbenavente","id":15848808,"avatar_url":"https://avatars.githubusercontent.com/u/15848808?v=3","gravatar_id":"","url":"https://api.github.com/users/vbenavente","html_url":"https://github.com/vbenavente","followers_url":"https://api.github.com/users/vbenavente/followers","following_url":"https://api.github.com/users/vbenavente/following{/other_user}","gists_url":"https://api.github.com/users/vbenavente/gists{/gist_id}","starred_url":"https://api.github.com/users/vbenavente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbenavente/subscriptions","organizations_url":"https://api.github.com/users/vbenavente/orgs","repos_url":"https://api.github.com/users/vbenavente/repos","events_url":"https://api.github.com/users/vbenavente/events{/privacy}","received_events_url":"https://api.github.com/users/vbenavente/received_events","type":"User","site_admin":false},"repo":{"id":65763398,"name":"data-structures","full_name":"vbenavente/data-structures","owner":{"login":"vbenavente","id":15848808,"avatar_url":"https://avatars.githubusercontent.com/u/15848808?v=3","gravatar_id":"","url":"https://api.github.com/users/vbenavente","html_url":"https://github.com/vbenavente","followers_url":"https://api.github.com/users/vbenavente/followers","following_url":"https://api.github.com/users/vbenavente/following{/other_user}","gists_url":"https://api.github.com/users/vbenavente/gists{/gist_id}","starred_url":"https://api.github.com/users/vbenavente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbenavente/subscriptions","organizations_url":"https://api.github.com/users/vbenavente/orgs","repos_url":"https://api.github.com/users/vbenavente/repos","events_url":"https://api.github.com/users/vbenavente/events{/privacy}","received_events_url":"https://api.github.com/users/vbenavente/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vbenavente/data-structures","description":null,"fork":false,"url":"https://api.github.com/repos/vbenavente/data-structures","forks_url":"https://api.github.com/repos/vbenavente/data-structures/forks","keys_url":"https://api.github.com/repos/vbenavente/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vbenavente/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vbenavente/data-structures/teams","hooks_url":"https://api.github.com/repos/vbenavente/data-structures/hooks","issue_events_url":"https://api.github.com/repos/vbenavente/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/vbenavente/data-structures/events","assignees_url":"https://api.github.com/repos/vbenavente/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/vbenavente/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/vbenavente/data-structures/tags","blobs_url":"https://api.github.com/repos/vbenavente/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vbenavente/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vbenavente/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/vbenavente/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vbenavente/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/vbenavente/data-structures/languages","stargazers_url":"https://api.github.com/repos/vbenavente/data-structures/stargazers","contributors_url":"https://api.github.com/repos/vbenavente/data-structures/contributors","subscribers_url":"https://api.github.com/repos/vbenavente/data-structures/subscribers","subscription_url":"https://api.github.com/repos/vbenavente/data-structures/subscription","commits_url":"https://api.github.com/repos/vbenavente/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/vbenavente/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/vbenavente/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/vbenavente/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/vbenavente/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/vbenavente/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vbenavente/data-structures/merges","archive_url":"https://api.github.com/repos/vbenavente/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vbenavente/data-structures/downloads","issues_url":"https://api.github.com/repos/vbenavente/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/vbenavente/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/vbenavente/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/vbenavente/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vbenavente/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/vbenavente/data-structures/releases{/id}","deployments_url":"https://api.github.com/repos/vbenavente/data-structures/deployments","created_at":"2016-08-15T20:38:26Z","updated_at":"2016-08-18T20:27:42Z","pushed_at":"2016-08-18T21:10:26Z","git_url":"git://github.com/vbenavente/data-structures.git","ssh_url":"git@github.com:vbenavente/data-structures.git","clone_url":"https://github.com/vbenavente/data-structures.git","svn_url":"https://github.com/vbenavente/data-structures","homepage":null,"size":13,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vbenavente/data-structures/pulls/1"},"html":{"href":"https://github.com/vbenavente/data-structures/pull/1"},"issue":{"href":"https://api.github.com/repos/vbenavente/data-structures/issues/1"},"comments":{"href":"https://api.github.com/repos/vbenavente/data-structures/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/vbenavente/data-structures/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/vbenavente/data-structures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vbenavente/data-structures/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/vbenavente/data-structures/statuses/6a628c772900eba125a99cdc77fa319de003c1a5"}}}}
{"actor":{"display_login":"cewing"}}