{"action":"created","comment":{"url":"https://api.github.com/repos/Copenbacon/data-structures/pulls/comments/92438485","pull_request_review_id":12948639,"id":92438485,"diff_hunk":"@@ -0,0 +1,112 @@\n+\"\"\"This tests the linked_list module.\"\"\"\n+import pytest\n+\n+INSTANTIATION_TABLE = [\n+    (\"new_linked_list\"),\n+]\n+\n+\n+PUSH_TABLE = [\n+    (3, 3),\n+    (4, 4)\n+]\n+\n+\n+POP_TABLE = [\n+    (7, 9),\n+    (33, 10)\n+]\n+\n+\n+SIZE_TABLE = [\n+    (795, 1),\n+    ([2, 33], 2),\n+    ([3, 4, 5], 3),\n+]\n+\n+\n+SEARCH_TABLE = [\n+    (3, 7, 3, 2, 3),\n+    (7, 7, 5, 5, 7),\n+    (3, 2, 1, 3, 3),\n+    (9, 8, 8, 9, 9),\n+    (8, 8, 8, 8, 8),\n+]\n+\n+REMOVE_TABLE = [\n+    (3, 7, 3, 2, 7),\n+    (7, 8, 7, 5, 8),\n+    (5, 8, 7, 5, 7),\n+]\n+\n+\n+@pytest.mark.parametrize(\"list_name\", INSTANTIATION_TABLE)\n+def test_linkedlist(list_name):\n+    \"\"\"Test instantiation LinkedList class.\"\"\"\n+    from linked_list import LinkedList\n+    list_name = LinkedList()\n+    assert list_name.size_of_list == 0\n+\n+\n+@pytest.mark.parametrize(\"val, result\", PUSH_TABLE)\n+def test_push(val, result):\n+    \"\"\"Test push method to add value to front of linked list.\"\"\"\n+    from linked_list import LinkedList\n+    list_name = LinkedList(val)\n+    assert list_name.head.val == result\n+\n+\n+@pytest.mark.parametrize(\"val1, val2\", POP_TABLE)\n+def test_pop(val1, val2):\n+    \"\"\"Test pop method to remove node off the front of a linked list.\"\"\"\n+    from linked_list import LinkedList\n+    list_name = LinkedList(val1)\n+    list_name.push(val2)\n+    assert list_name.pop() == val2\n+\n+\n+@pytest.mark.parametrize(\"val1, result\", SIZE_TABLE)\n+def test_size(val1, result):\n+    \"\"\"Test size method in LinkedList class.\"\"\"\n+    from linked_list import LinkedList\n+    list_name = LinkedList(val1)\n+    assert list_name.size() == result\n+\n+\n+@pytest.mark.parametrize('val_to_search_for, val1, val2, val3, result', SEARCH_TABLE)\n+def test_search(val_to_search_for, val1, val2, val3, result):\n+    \"\"\"Test search method to find value.\"\"\"\n+    from linked_list import LinkedList\n+    search_list = LinkedList(val1)\n+    search_list.push(val2)\n+    search_list.push(val3)\n+    assert search_list.search(val_to_search_for).val == result\n+\n+\n+@pytest.mark.parametrize(\"val_to_delete, val1, val2, val3, result\", REMOVE_TABLE)\n+def test_remove(val_to_delete, val1, val2, val3, result):\n+    \"\"\"Test remove method in LinkedList class.\"\"\"\n+    from linked_list import LinkedList\n+    list_name = LinkedList(val1)\n+    list_name.push(val2)\n+    list_name.push(val3)\n+    assert_result = list_name.remove(val_to_delete)\n+    assert assert_result.val == result","path":"src/test_linked_list.py","position":94,"original_position":94,"commit_id":"40fc849f8e2ca61bb60af7f4bb89588ecddd880a","original_commit_id":"40fc849f8e2ca61bb60af7f4bb89588ecddd880a","user":{"login":"nhuntwalker","id":5581888,"avatar_url":"https://avatars.githubusercontent.com/u/5581888?v=3","gravatar_id":"","url":"https://api.github.com/users/nhuntwalker","html_url":"https://github.com/nhuntwalker","followers_url":"https://api.github.com/users/nhuntwalker/followers","following_url":"https://api.github.com/users/nhuntwalker/following{/other_user}","gists_url":"https://api.github.com/users/nhuntwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/nhuntwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhuntwalker/subscriptions","organizations_url":"https://api.github.com/users/nhuntwalker/orgs","repos_url":"https://api.github.com/users/nhuntwalker/repos","events_url":"https://api.github.com/users/nhuntwalker/events{/privacy}","received_events_url":"https://api.github.com/users/nhuntwalker/received_events","type":"User","site_admin":false},"body":"This isn't the way to test this method. Test that the thing no longer exists in your list, or test that the size of the list decreases or both. Also get some variety in your test for edge cases. What if you remove the head of the list? What about the tail?","created_at":"2016-12-14T16:56:31Z","updated_at":"2016-12-14T16:57:50Z","html_url":"https://github.com/Copenbacon/data-structures/pull/1#discussion_r92438485","pull_request_url":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Copenbacon/data-structures/pulls/comments/92438485"},"html":{"href":"https://github.com/Copenbacon/data-structures/pull/1#discussion_r92438485"},"pull_request":{"href":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1","id":97704836,"html_url":"https://github.com/Copenbacon/data-structures/pull/1","diff_url":"https://github.com/Copenbacon/data-structures/pull/1.diff","patch_url":"https://github.com/Copenbacon/data-structures/pull/1.patch","issue_url":"https://api.github.com/repos/Copenbacon/data-structures/issues/1","number":1,"state":"open","locked":false,"title":"Linked list","user":{"login":"chamberi","id":20977299,"avatar_url":"https://avatars.githubusercontent.com/u/20977299?v=3","gravatar_id":"","url":"https://api.github.com/users/chamberi","html_url":"https://github.com/chamberi","followers_url":"https://api.github.com/users/chamberi/followers","following_url":"https://api.github.com/users/chamberi/following{/other_user}","gists_url":"https://api.github.com/users/chamberi/gists{/gist_id}","starred_url":"https://api.github.com/users/chamberi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamberi/subscriptions","organizations_url":"https://api.github.com/users/chamberi/orgs","repos_url":"https://api.github.com/users/chamberi/repos","events_url":"https://api.github.com/users/chamberi/events{/privacy}","received_events_url":"https://api.github.com/users/chamberi/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-13T08:23:39Z","updated_at":"2016-12-14T16:57:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f003c740aae47e5a9b116b7ef9f40ab2bec69e73","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Copenbacon/data-structures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Copenbacon/data-structures/issues/1/comments","statuses_url":"https://api.github.com/repos/Copenbacon/data-structures/statuses/40fc849f8e2ca61bb60af7f4bb89588ecddd880a","head":{"label":"Copenbacon:linked_list","ref":"linked_list","sha":"40fc849f8e2ca61bb60af7f4bb89588ecddd880a","user":{"login":"Copenbacon","id":18360407,"avatar_url":"https://avatars.githubusercontent.com/u/18360407?v=3","gravatar_id":"","url":"https://api.github.com/users/Copenbacon","html_url":"https://github.com/Copenbacon","followers_url":"https://api.github.com/users/Copenbacon/followers","following_url":"https://api.github.com/users/Copenbacon/following{/other_user}","gists_url":"https://api.github.com/users/Copenbacon/gists{/gist_id}","starred_url":"https://api.github.com/users/Copenbacon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copenbacon/subscriptions","organizations_url":"https://api.github.com/users/Copenbacon/orgs","repos_url":"https://api.github.com/users/Copenbacon/repos","events_url":"https://api.github.com/users/Copenbacon/events{/privacy}","received_events_url":"https://api.github.com/users/Copenbacon/received_events","type":"User","site_admin":false},"repo":{"id":76294768,"name":"data-structures","full_name":"Copenbacon/data-structures","owner":{"login":"Copenbacon","id":18360407,"avatar_url":"https://avatars.githubusercontent.com/u/18360407?v=3","gravatar_id":"","url":"https://api.github.com/users/Copenbacon","html_url":"https://github.com/Copenbacon","followers_url":"https://api.github.com/users/Copenbacon/followers","following_url":"https://api.github.com/users/Copenbacon/following{/other_user}","gists_url":"https://api.github.com/users/Copenbacon/gists{/gist_id}","starred_url":"https://api.github.com/users/Copenbacon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copenbacon/subscriptions","organizations_url":"https://api.github.com/users/Copenbacon/orgs","repos_url":"https://api.github.com/users/Copenbacon/repos","events_url":"https://api.github.com/users/Copenbacon/events{/privacy}","received_events_url":"https://api.github.com/users/Copenbacon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Copenbacon/data-structures","description":null,"fork":false,"url":"https://api.github.com/repos/Copenbacon/data-structures","forks_url":"https://api.github.com/repos/Copenbacon/data-structures/forks","keys_url":"https://api.github.com/repos/Copenbacon/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Copenbacon/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Copenbacon/data-structures/teams","hooks_url":"https://api.github.com/repos/Copenbacon/data-structures/hooks","issue_events_url":"https://api.github.com/repos/Copenbacon/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/Copenbacon/data-structures/events","assignees_url":"https://api.github.com/repos/Copenbacon/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/Copenbacon/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/Copenbacon/data-structures/tags","blobs_url":"https://api.github.com/repos/Copenbacon/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Copenbacon/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Copenbacon/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/Copenbacon/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Copenbacon/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/Copenbacon/data-structures/languages","stargazers_url":"https://api.github.com/repos/Copenbacon/data-structures/stargazers","contributors_url":"https://api.github.com/repos/Copenbacon/data-structures/contributors","subscribers_url":"https://api.github.com/repos/Copenbacon/data-structures/subscribers","subscription_url":"https://api.github.com/repos/Copenbacon/data-structures/subscription","commits_url":"https://api.github.com/repos/Copenbacon/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/Copenbacon/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/Copenbacon/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/Copenbacon/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/Copenbacon/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/Copenbacon/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Copenbacon/data-structures/merges","archive_url":"https://api.github.com/repos/Copenbacon/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Copenbacon/data-structures/downloads","issues_url":"https://api.github.com/repos/Copenbacon/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/Copenbacon/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/Copenbacon/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/Copenbacon/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Copenbacon/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/Copenbacon/data-structures/releases{/id}","deployments_url":"https://api.github.com/repos/Copenbacon/data-structures/deployments","created_at":"2016-12-12T20:55:51Z","updated_at":"2016-12-12T20:55:51Z","pushed_at":"2016-12-14T16:44:52Z","git_url":"git://github.com/Copenbacon/data-structures.git","ssh_url":"git@github.com:Copenbacon/data-structures.git","clone_url":"https://github.com/Copenbacon/data-structures.git","svn_url":"https://github.com/Copenbacon/data-structures","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Copenbacon:master","ref":"master","sha":"c3221fdc08259a7dc1f87ad5d57dde02a554a518","user":{"login":"Copenbacon","id":18360407,"avatar_url":"https://avatars.githubusercontent.com/u/18360407?v=3","gravatar_id":"","url":"https://api.github.com/users/Copenbacon","html_url":"https://github.com/Copenbacon","followers_url":"https://api.github.com/users/Copenbacon/followers","following_url":"https://api.github.com/users/Copenbacon/following{/other_user}","gists_url":"https://api.github.com/users/Copenbacon/gists{/gist_id}","starred_url":"https://api.github.com/users/Copenbacon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copenbacon/subscriptions","organizations_url":"https://api.github.com/users/Copenbacon/orgs","repos_url":"https://api.github.com/users/Copenbacon/repos","events_url":"https://api.github.com/users/Copenbacon/events{/privacy}","received_events_url":"https://api.github.com/users/Copenbacon/received_events","type":"User","site_admin":false},"repo":{"id":76294768,"name":"data-structures","full_name":"Copenbacon/data-structures","owner":{"login":"Copenbacon","id":18360407,"avatar_url":"https://avatars.githubusercontent.com/u/18360407?v=3","gravatar_id":"","url":"https://api.github.com/users/Copenbacon","html_url":"https://github.com/Copenbacon","followers_url":"https://api.github.com/users/Copenbacon/followers","following_url":"https://api.github.com/users/Copenbacon/following{/other_user}","gists_url":"https://api.github.com/users/Copenbacon/gists{/gist_id}","starred_url":"https://api.github.com/users/Copenbacon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Copenbacon/subscriptions","organizations_url":"https://api.github.com/users/Copenbacon/orgs","repos_url":"https://api.github.com/users/Copenbacon/repos","events_url":"https://api.github.com/users/Copenbacon/events{/privacy}","received_events_url":"https://api.github.com/users/Copenbacon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Copenbacon/data-structures","description":null,"fork":false,"url":"https://api.github.com/repos/Copenbacon/data-structures","forks_url":"https://api.github.com/repos/Copenbacon/data-structures/forks","keys_url":"https://api.github.com/repos/Copenbacon/data-structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Copenbacon/data-structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Copenbacon/data-structures/teams","hooks_url":"https://api.github.com/repos/Copenbacon/data-structures/hooks","issue_events_url":"https://api.github.com/repos/Copenbacon/data-structures/issues/events{/number}","events_url":"https://api.github.com/repos/Copenbacon/data-structures/events","assignees_url":"https://api.github.com/repos/Copenbacon/data-structures/assignees{/user}","branches_url":"https://api.github.com/repos/Copenbacon/data-structures/branches{/branch}","tags_url":"https://api.github.com/repos/Copenbacon/data-structures/tags","blobs_url":"https://api.github.com/repos/Copenbacon/data-structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Copenbacon/data-structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Copenbacon/data-structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/Copenbacon/data-structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Copenbacon/data-structures/statuses/{sha}","languages_url":"https://api.github.com/repos/Copenbacon/data-structures/languages","stargazers_url":"https://api.github.com/repos/Copenbacon/data-structures/stargazers","contributors_url":"https://api.github.com/repos/Copenbacon/data-structures/contributors","subscribers_url":"https://api.github.com/repos/Copenbacon/data-structures/subscribers","subscription_url":"https://api.github.com/repos/Copenbacon/data-structures/subscription","commits_url":"https://api.github.com/repos/Copenbacon/data-structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/Copenbacon/data-structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/Copenbacon/data-structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/Copenbacon/data-structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/Copenbacon/data-structures/contents/{+path}","compare_url":"https://api.github.com/repos/Copenbacon/data-structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Copenbacon/data-structures/merges","archive_url":"https://api.github.com/repos/Copenbacon/data-structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Copenbacon/data-structures/downloads","issues_url":"https://api.github.com/repos/Copenbacon/data-structures/issues{/number}","pulls_url":"https://api.github.com/repos/Copenbacon/data-structures/pulls{/number}","milestones_url":"https://api.github.com/repos/Copenbacon/data-structures/milestones{/number}","notifications_url":"https://api.github.com/repos/Copenbacon/data-structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Copenbacon/data-structures/labels{/name}","releases_url":"https://api.github.com/repos/Copenbacon/data-structures/releases{/id}","deployments_url":"https://api.github.com/repos/Copenbacon/data-structures/deployments","created_at":"2016-12-12T20:55:51Z","updated_at":"2016-12-12T20:55:51Z","pushed_at":"2016-12-14T16:44:52Z","git_url":"git://github.com/Copenbacon/data-structures.git","ssh_url":"git@github.com:Copenbacon/data-structures.git","clone_url":"https://github.com/Copenbacon/data-structures.git","svn_url":"https://github.com/Copenbacon/data-structures","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1"},"html":{"href":"https://github.com/Copenbacon/data-structures/pull/1"},"issue":{"href":"https://api.github.com/repos/Copenbacon/data-structures/issues/1"},"comments":{"href":"https://api.github.com/repos/Copenbacon/data-structures/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Copenbacon/data-structures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Copenbacon/data-structures/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Copenbacon/data-structures/statuses/40fc849f8e2ca61bb60af7f4bb89588ecddd880a"}}}}
{"actor":{"display_login":"nhuntwalker"}}